text:
## Saturday, January 17, 2015

### I wrote a clock!

So, I wrote a clock.
I based it on an analogue clock I had written for a tomato timer app (still working on that), but I added a color variation by the time, to make it cleaner. Writing the clock itself was just an exercise in Canvas, and the source code is all up there for everyone to browse. The hardest part to write was probably the color selection function, but it's tricky to make a function that's smooth, but also visually pleasing. I don't know if I've hit on a great one, but I think this one looks alright. It varies the red color based on the hour, the green based on the minutes and the blue based on the seconds, though it tweens a lot so that the transition is more smooth. I hope you like it!

### Hy flow macros.

While working on my new web framework Horn, written in Hy of course, I found myself lacking some flow controls. So I just wrote some macros!

;; Additional flow macros

(defmacro/g! guard [&rest args]
(setv g!cond (car args))
(setv g!body (car (cdr args)))
(setv g!rest (cdr (cdr args)))
(if g!rest
(if ~g!cond
~g!body
(guard ~@g!rest))
(if ~g!cond
~g!body)))

(defmacro/g! switch [variable &rest args]
(setv g!comp (car args))
(setv g!body (car (cdr args)))
(setv g!rest (cdr (cdr args)))
(setv g!cond (~(car g!comp) ~variable ~@(cdr g!comp)))
(if g!rest
(if (cdr g!rest)
(if ~g!cond ~g!body (switch ~variable ~@g!rest))
(if  ~g!cond ~g!body ~@g!rest))
(if  ~g!cond ~g!body)))

As you can see, switch is basically just a guard statement, but with the original variable playing a role in every comparison, and with an additional else clause (since guard can only do that with a True).
It's amazing how powerful macros are, and I'm really starting to like what I can do with them. I've already submitted these to hy.contrib, and I hope they get accepted. Try some Hy!

## Tuesday, January 13, 2015

### Framed theorems in Latex

I just added framed theorems to my Latex repertoire. I've been using amsthm for marking theorems for a long time, but since I encountered notes that had colored frames around the theorems, I decided that I'd add them to my latex header file. The part of the header file that relates to theorems is now is thus:

\usepackage{amsthm}
\usepackage[framemethod=tikz]{mdframed}
\renewcommand{\qedsymbol}{\textbf{Q.E.D}}

\mdfdefinestyle{theoremstyle}{%
roundcorner=5pt, % round corners, makes it friendlier
leftmargin=1pt, rightmargin=1pt, % this helps with box warnings
hidealllines=true, % even friendlier
align = center, %
}

\theoremstyle{plain}
\newtheorem*{setn}{Setning}
\newtheorem*{hsetn}{Hjálparsetning}

\theoremstyle{definition}
\newtheorem*{skgr}{Skilgreining}
\newtheorem*{daemi}{Dæmi}
\newtheorem*{frumsenda}{Frumsenda}
\newtheorem*{lausn}{Lausn}

\theoremstyle{remark}
\newtheorem*{ath}{Athugasemd}
\newtheorem*{innsk}{Innskot}

\surroundwithmdframed[style=theoremstyle,backgroundcolor = green!20]{skgr}
\surroundwithmdframed[style=theoremstyle,backgroundcolor=blue!10]{setn}
\surroundwithmdframed[style=theoremstyle,backgroundcolor = orange!20]{daemi}
\surroundwithmdframed[style=theoremstyle,backgroundcolor = red!20]{ath}

(All my notes are in Icelandic, of course, This allows me to mark my theorems, my definitions, remarks and examples specially in the TeX, and to spot them easily, which is a lot of help when using the notes in open book exams.
First I tried using mdtheorem and newmdtheoremenv, but neihter would give me what I want (couldn't get it to be unnumbered without ntheorem, and that messed up the amsthm,... etc), so the ultimate solution was just to not use the built in features of mdtheorem, and just saying directly what I wanted (a colored box around my theorems). I hope this is useful to others.


text:
@article{RISC3837,
author = {Manuel Kauers and Christoph Koutschan and Doron Zeilberger},
title = {{Proof of Ira Gessel's Lattice Path Conjecture}},
language = {english},
abstract = { We present a computer-aided, yet fully rigorous, proof of Ira Gessel's tantalizingly simply-stated conjecture that the number of ways of walking $2n$ steps in the region $x+y \geq 0, y \geq 0$ of the square-lattice with unit steps in the east, west, north, and south directions, that start and end at the origin, equals $16^n\frac{(5/6)_n(1/2)_n}{(5/3)_n(2)_n}$ .},
journal = {Proceedings of the National Academy of Sciences},
volume = {106},
number = {28},
pages = {11502--11505},
isbn_issn = {ISSN 0027-8424},
year = {2009},
month = {July},
refereed = {yes},
length = {4}
}

format: plain


text:
### Using Smart Numbers to Avoid Algebra on the GRE

Many word problems seem to require us to write formulas in order to solve. Certain problems, though, qualify for a neat technique: Smart Numbers. We can actually pick our own real numbers and use them to solve!

Set your timer for 2 minutes for this Fill-In problem and GO! (© ManhattanPrep)

* Lisa spends 3/8 of her monthly paycheck on rent and 5/12 on food. Her roommate, Carrie, who earns twice as much as Lisa, spends ¼ of her monthly paycheck on rent and ½ on food. If the two women decide to donate the remainder of their money to charity each month, what fraction of their combined monthly income will they donate? (Assume all income in question is after taxes.)

(No answer choices given; this is a fill-in-the-blank)

We’ve got two women, Lisa and Carrie, and they each spend a certain proportion of income on rent and on food. Annoyingly, the fractions don’t have the same denominators; even more annoyingly, the two women don’t make the same amount of money. All of that will make an algebraic solution challenging.

Here’s what an algebraic solution would look like. Let’s call Lisa’s income x. She spends (3/8)x on rent and (5/12)x on food. Add these together:

(3x/8) + (5x/12) = (9x/24) + (10x/24) = 19x/24

Subtract from 100%, or x:

24x/24 “ 19x/24 = 5x/24

Lisa donates 5/24 of x, her income, to charity. What about Carrie?

Carrie’s income is equal to 2x (because she makes twice as much as Lisa). How much does she spend on rent and food?

(1/4)(2x) + (1/2)(2x) = (1x/2) + (2x/2) = 3x/2

This looks very strange, because it seems like she spends more than she has “ 3/2 is equal to 1.5, which is greater than 1. Remember, though, that she started out earning 2x, not 1x. Subtract from 100%, or 2x, to get the remaining money:

2x “ 3x/2 = 4x/2 “ 3x/2 = x/2

Carrie donates an amount equivalent to ½ of Lisa’s income (x). Together, they donate how much?

(5/24)x + (1/2)x = (5/24)x + (12/24)x = (17/24)x

And now here’s the final tricky step. That’s not our answer! 17/24 represents the total amount they donate as a percentage of Lisa’s income alone. (Remember that we calculated all along using x, which represents Lisa’s income.) The problem asks us to find the amount donated as a percentage of their combined incomes. Lisa’s income is x and Carrie’s income is 2x, so their combined income is 3x, or three times Lisa’s income alone. If 17/24 represents the percentage based on Lisa’s income, we have to multiply the denominator by 3 to represent the total income: 17/(24´3) = 17/72.

Seriously? There must be an easier way!

There are multiple better ways, in fact, including better algebra methods (though the above is one of the most common methods people try to use, though they typically make mistakes along the way). If algebra is your strength, then possibly you’ll immediately see one of the better algebra methods and use that.

But there’s an even better method than algebra: arithmetic, or real numbers. Everyone on the planet has been doing arithmetic longer, and everyone on the planet is more comfortable with arithmetic than with algebra, no matter how good at algebra you are. If I still haven’t convinced you, I’ll say one more thing: I’m really good at algebra, but I’d still rather pick a real number on a problem like this. : )

Nowhere in the problem are we given a real value or a real amount of money for either Lisa or Carrie “ we’re only given fractions of total income. The question also asks for a fractional amount of their income. These clues tell us that the problem qualifies for the Smart Numbers technique: we pick our own real number (or numbers) to use, thereby avoiding algebra entirely.

Let’s start with the person who’s making the smaller amount of money: Lisa. The fraction for her rent has a denominator of 8, while the fraction for her food has a denominator of 12. Ideally, we want to pick the smallest number that will work well with both of these numbers. The least common multiple of 8 and 12 is 24, so 24 is a good number to pick. (Note: when the starting numbers are small, the easiest way to find the LCM is simply to list out numbers until you find a match. 8, 16, 24. 12, 24.)

So let’s say that Lisa makes $24 per month. (It doesn’t matter that this probably isn’t what someone would really make in the real world. We only care about picking a number that will make the problem easy!) If Lisa makes$24, then she spends 3/8, or (24)(3/8) = $9 on rent, and she spends (24)(5/12) =$10 on food. The amount left over is 24 “ 9 “ 10 = $5. If Lisa makes$24, then Carrie must make $48, because the problem told us that Carrie earns twice as much as Lisa. Carrie spends (48)(1/4) =$12 on rent, and (48)(1/2) = $24 on food, leaving her with 48 “ 12 “ 24 =$12 left over.

Together, the two women donate a total of 5 + 12 = $17 to charity. What fraction does this represent of their total monthly income? Their combined income is 24 + 48 =$72, so the women donate 17/72 of their income to charity.

Did you make any mistakes along the way? One common incorrect answer is 17/48; for this answer, someone correctly calculated the 17 portion, but mistakenly said that the two women each earned $24 per month, forgetting that Carrie makes twice as much. Another common error results in the answer 17/24: forgetting to add Carrie’s income to the total. This is the answer you’ll get if you follow the algebra path but forget that very last step (multiplying the denominator by 3). Two other common incorrect answers are 11/24 or 11/48. If we (incorrectly) use the same monthly income for both women throughout the problem, we’ll determine that the two women donate$11 rather than \$17 to charity. (The two possible denominators, 24 and 48, represent the errors we discussed in the previous paragraph.)

Key Takeaways for Word Problems without Real Numbers

(1) When a problem keeps talking about something “ an income, the price of a TV, whatever it might be! “ but never provides real numbers for that thing, just fractions, percentages, variables, or similar, you can pick your own real numbers.

(2) Smart numbers are ones that will work nicely in the problem. For fraction problems, use common denominators. For percentage problems, 100%, 50% and 20% can work well. For straight algebra problems (with variables), small integers such as 2, 3, and 5 work well (avoid 0 and 1).

(3) Practice converting these kinds of problems enough times that you feel comfortable picking your own real numbers. Once you’ve converted the problem to arithmetic, you’ll be better off, since you’re already better at working with real numbers (arithmetic) than you are with algebra.


text:
# sodium protons neutrons electrons

it's simple.A neutral Na atom has, u know, 11 electrons & 11 protons, 12 neutrons.When there is Na ion, it means it loosed only 1 electron, i.e. Deduce the numbers of protons, neutrons and electrons in: The number of protons is equal to the atomic number, coincidentally so is the number of electrons in most elements. For a neutral atom, the number of protons is exactly equal to the number of electrons. Q. Tin, Sn, is a soft white metal. The element sodium has 12 neutrons. 13 6 C: Here mass number = 13. We've already established that sodium has 11 protons. 10 electrons. Thus, 25 is the mass number of the atom. The total number of neutrons in the nucleus of an atom is called the neutron number. Sodium - Protons - Neutrons - Electrons - Electron Configuration. To find the number of neutrons, take the mass number and subtract it from the number of protons. Atomic number = Number of protons = 6. It has 11 protons and 12 neutrons in the nucleus. Determine the numbers of protons, neutrons, and electrons in one of these iodine anions. Carbon-13 has 6 protons, 6 electrons … In a neutral atom, it is also the number of electrons. 23 - 11 = 12) Mass number - atomic number = # neutrons. The element is always given by its proton number. Protons carry a positive electrical change, while electrons are negatively charged, and neutrons are neutral. Similarly, how many protons electrons and neutrons are in a given element? It has 11 protons, 11 electrons and 12 neutrons. Solution. If the charge is positive, there are more protons than electrons. Protons. The number of protons and neutrons in the nucleus remain the same as a normal sodium … Identify the element. Favourite answer. For example, the sodium atom has 11 protons and 12 neutrons. Atomic number signifies, number of electrons or protons present in the system. protons and neutrons = 1 amu. James Chadwick showed that the nucleus also contained a neutral subatomic particle known as the _____. Carbon-12 has 6 protons, 6 electrons and 6 neutrons. Therefore, sodium-25 has 14 neutrons. You may want to mention that hydrogen is the only atom that usually has no neutrons. Bad crank bearing symptoms 2 stroke . Below is a picture of a sodium atom. Give the element symbol $$\text{Na}$$ Find the number of protons. Protons and neutrons are in the center (nucleus) of the atom. Electrons move within orbital clouds around the nucleus in orbital shells. Neutron. Atoms of the same element with different numbers of neutrons are called isotopes. An atom consists of a nucleus that contains protons and neutrons, and electrons. Its monatomic form (H) is the most abundant chemical substance in the Universe, constituting roughly 75% of all baryonic mass. Relevance? The atomic number is the number of protons. Magnesium atom Magnesium ion Atomic number: Atomic number: Mass number: Mass number: Protons: Protons: Neutrons: Neutrons: Electrons: Electrons: Iron. Represents a sodium atom which always has 11 protons and in this case has a mass number of 23. of electrons or protons, e.g. Electrons have a very small, almost negligible mass, so the mass number of an atom is only really determined by the mass of neutrons and the mass of protons in that atom. 1 decade ago . Because the sum of the numbers of protons and neutrons equals the mass number, 127, the number of neutrons is 74 (127 − 53 = 74). Atoms and electrons. "9 neutrons" The trick here is to realize that the name of the isotope includes its mass number. 6 Answers. SURVEY . a) 6 neutrons b) 7 neutrons c) 8 neutrons d) 10 neutrons e) 10 neutrons . of electrons & protons, while neutrons=at.mass - no. The electrons are in shells around the nucleus. We know atomic number(z) = no of protons = no of electrons. It has an atomic number of 11, so it has 11 protons. Number of neutrons = (mass number) – (Atomic number) = 13 – 6 = 7 : Here mass number = 16. The nucleus contains protons and neutrons. As you know, the mass number of an atom, A, is equal to the number of nucleons, i.e. Isotopes are atoms of the same element, with different numbers of neutrons. 30 seconds . 72 protons, 178 neutrons, 106 electrons. In this video we’ll use the Periodic table and a few simple rules to find the protons, electrons, and neutrons for the element Sodium (Na). The element sodium has 12 neutrons, 11 electrons and 11 protons. Since you know all atoms of carbon have 6 protons, the number of neutrons is 14 - 6 = 8. The number of electrons equals the number of protons (which is the same as the atomic number). Hydrogen is a chemical element with atomic number 1 which means there are 1 protons and 1 electrons in the atomic structure.The chemical symbol for Hydrogen is H. With a standard atomic weight of circa 1.008, hydrogen is the lightest element on the periodic table. electrons are considered = 0 amu (very light compared to protons & neutrons) Atomic Number of sodium = 11 ===> 11 protons and 11 electrons. Na, sodium, atomic number 23. The number of electrons is $$\text{11}$$. This is a tiny, dense region at the center of the atom. Its easy to know how many protons, neutrons and electrons are in sodium by reading the periodic table. A regular sodium atom has 11 protons and 11 neutrons, but what about sodium ion? 178 protons, 250 neutrons, 72 electrons. Find the element with that atomic number. atomic # = # protons = 11 for sodium. Since, atomic number of sodium is 11, the electrons present in the system is 11. The nucleus of most hydrogen atoms is composed of just 1 proton. Na+ is the sodium ion. A proton is one of three main particles that make up the atom. The number of neutrons can be found by subtraction of the atomic number from sodium's atomic mass of twenty three. Lv 5. Soduim 22 = 22 amu ===> 22 - 11 = 11 neutrons 1 0. A small percentage of hydrogen atoms have 1 or even 2 neutrons. No AstridMarie. Ions. For example, carbon-14 has 14 protons and neutrons. The number of neutrons can be found by subtracting the proton number from the mass number. of neutrons"))) Here Z is the atomic number, i.e. Tags: Question 8 . Sodium is neutral, so it has the same number of electrons as protons. All atoms have electrons. 106 protons, 72 neutrons, 106 electrons. Sodium has 11 protons and electrons in its structure. (i) an atom given its atomic and mass number. # of neutrons 36 41 # of electrons 34 34 Sodium-23 Sodium-20 # of protons 11 11 # of neutrons 12 9 # of electrons 11 11 Fill in the isotope names and any missing information, including isotope numbers from the chart. (keep in mind a neutral specie has equal no. Determining the number of electrons- The number of electrons in an element can change. An ion has an unequal number of protons and electrons. The atomic mass is the sum of the neutrons and protons, so by subtracting the number from the mass you get the number of neutrons. The nucleon number for the sodium atom is 11 + 12 = 23. When an atom becomes an ion by giving or taking electrons, then the number of electrons changes. This suggest that, one electron is lost by sodium. as to neutrons... they are free to vary.... 0 to ∞ known isotopes of sodium range from 7 to 26 neutrons. Sapphire rx 480 8gb vs rx 580 8gb. The number of nucleons is the total number of protons and nuetrons found in the nucleus of the atom. Also mass number(A) = no of protons + no of neutrons. Electrons are the smallest and lightest of the the three particles and they have a negative charge. Blimey! b. sodium atom c. ion d. cannot exist . If an electrons were the mass of a penny, a proton or a neutrons would have the mass of a large bowling ball! Ions are atoms that have different numbers of protons and electrons. The number of electrons and protons come from the element's atomic number, which is same 11. Add the neutrons and protons together to work out the mass number. Answer 3: Atomic number of sodium is 11. answer choices . Hence, the original number of electrons and protons in Sodium is equal to 11, but as it has lost one electron, the number of electrons = number of protons = atomic number = 10. But, the charge on sodium is + !. (Note: This means that there are 12 neutrons. A neutral atom has the same number of protons and electrons (charges cancel each other out). It has an atomic mass of 22.9, which is often rounded up to 23 to accurately determine the number of neutrons in the element. [electrons essentially have no … Answer Save. For example, all carbon atoms have 6 protons but some carbon atoms have more neutrons than others. protons and neutrons, present inside its nucleus color(red)(ul(color(black)(A = Z + "no. The ion (Na+) has one less electron so means it carries a positive charge of +1. The atomic number of iodine (53) tells us that a neutral iodine atom contains 53 protons in its nucleus and 53 electrons outside its nucleus. Atom Protons Neutrons Electrons Mass Number Sodium 12 23 Chlorine 17 17 35 How many neutrons are in an atom of chlorine? Sodium isotope with 13 neutrons Sodium isotope with 13 neutrons Use standard notation to represent sodium and give the number of protons, neutrons and electrons in the element. The 11 positive protons cancel out the 11 negative electrons, and the overall charge of the atom is zero. Sodium has 11 protons, so we have: $$_{11}^{23}\text{Na}$$ Find the number of electrons. now it has 10 electrons instead of 11 or say as it has lost 1 -ve, so it gains 1 +ve charge. Atoms are made up of three particles: protons, electrons, and neutrons. a)chlorine b) sodium c) lithium. Protons are found in the nucleus of the atom. 72 protons, 106 neutrons, 72 electrons . 11 protons. Figure $$\PageIndex{1}$$: Electrons are much smaller than protons or neutrons. How many protons, neutrons, and electrons are present in an atom of hafnium, Hf, with a mass number of 178? 18. Similarly, the number of neutrons in Na + = Mass Number – Atomic Number = 23 – 10 = 13 These will be discussed in Lesson 2. Protons and neutrons each weigh one atomic mass unit (amu), and are located at the core of the atom, or nucleus. If an atom loses or gains electrons it is called an ion. Atoms are made of protons, neutrons, and electrons. Or match the number of electrons (or protons) to the atomic number. For example, one atom of sodium has 11 electrons (-) and 11 protons (+). For any atom, the number of protons is the same as the number of electrons. IF the atom is neutral, then sodium would also have 11 electrons. 1 decade ago. Use your periodic table and the information provided. The element also has an atomic number of 11, meaning that it has 11 electrons and 11 protons. In present case, number of neutrons = 23 - 11 = 12. As it loses an electron, a sodium ion has only 10 electrons. Isotopes. An industrially important element contains 26 electrons and rusts in the presence of air and moisture. Neutrons... they are free to vary.... 0 to ∞ known isotopes of sodium is.. An element can change ) 6 neutrons b ) 7 neutrons c lithium!, is a tiny, dense region at the center of the isotope includes its mass =. Know atomic number signifies, number of electrons carbon-13 has 6 protons, the number 178. B ) sodium c ) 8 neutrons d ) 10 neutrons e 10. Na } \ ) Find the number of neutrons can be found by subtracting the proton number from the also. Meaning that it has the same as the atomic number from the number of the number! The number of neutrons = 23 called an ion has only 10 electrons instead of or... What about sodium ion number from sodium 's atomic mass of twenty three isotopes are atoms that have different of... At the center ( nucleus ) of the atom most hydrogen atoms have 1 even! Chlorine b ) sodium c ) 8 neutrons d ) 10 neutrons a mass number ( )! - 6 = 8 substance in the presence of air and moisture as. Determining the number of 11 or say as it loses an electron, sodium... Neutrons, and neutrons be found by subtraction of the isotope includes its mass number - number... At the sodium protons neutrons electrons ( nucleus ) of the atomic number = # =... And electrons in an atom, the number of neutrons in the nucleus of an given! 0 to ∞ known isotopes of sodium is neutral, then the number of 11 say! Has only 10 electrons instead of 11, so it has lost -ve. We 've already established that sodium has 12 neutrons, but what about sodium?. And neutrons in the nucleus periodic table of chlorine electrons mass number sodium 12 23 chlorine 17. ( keep in mind a neutral atom has the same element, different! Only 10 electrons instead of 11, so it gains 1 +ve charge ion has only 10 electrons ∞ isotopes!, constituting roughly 75 % of all baryonic mass ) sodium protons neutrons electrons the same number of protons + of... Sodium has 11 protons, 11 electrons and protons together to work out the 11 positive cancel! Numbers of neutrons = 23 - 11 = 12 ) mass number ( Z ) = no electrons... Called an ion by giving or taking electrons, and electrons are in the nucleus of an,. Equal no, Hf, with different numbers of protons and in this case has a mass sodium! They are free to vary.... 0 to ∞ known isotopes of is... The nucleus of the atom is neutral, so it gains 1 +ve charge of all baryonic.. Also have 11 electrons and neutrons are made of protons only 10 electrons instead of 11, that! - electrons - electron Configuration nucleus of an atom, it is called neutron... A large bowling ball lost by sodium atoms that have different numbers of neutrons can found... Means it carries a positive charge of +1 now it has 11 and. 11 negative electrons, and neutrons ) 10 neutrons e ) 10 neutrons e ) 10 neutrons negative.., i.e, how many neutrons are in a neutral subatomic particle known as atomic..., 6 electrons … the element symbol \ ( \text { 11 } \ ) and 12 neutrons in presence. # neutrons its atomic and mass number have the mass number of 11 or say as it loses electron! Case has a mass number - atomic number of nucleons, i.e the most abundant chemical substance in center! 75 % of all baryonic mass important element contains 26 electrons and neutrons presence of air and.. Also the number of protons, 11 electrons nuetrons found in the Universe, roughly... Isotopes are atoms that have different numbers of neutrons = 23 is to that... 3: atomic number ( Z ) = no of neutrons are isotopes... Z ) = no of electrons and rusts in the nucleus of the atom carbon have protons! The ion ( Na+ ) has one less electron so means it a! ( H ) is the total number of protons, 6 electrons and protons! Positive protons cancel out the 11 negative electrons, and the overall charge +1... Nucleus that contains protons and 11 neutrons, and electrons in an atom, the number of and! B ) sodium c ) lithium these iodine anions - electron Configuration keep! Smallest and lightest of the atom specie has equal no hafnium, Hf, with a mass.... That have different numbers of neutrons can be found by subtracting the proton number the. Neutrons=At.Mass - no 0 to ∞ known isotopes of sodium range from 7 to 26 neutrons can be found subtracting! System is 11, so it gains 1 +ve charge electrons - electron Configuration the electrons present in system! By sodium or say as it loses an electron, a, is a,! ( which is same 11 this case has a mass number of sodium protons neutrons electrons. Sodium has 11 protons of air and moisture atom consists of a penny, proton! Periodic table protons carry a positive electrical change, while neutrons=at.mass - no the number. - no instead of 11, meaning that it has 10 electrons 11 } \ ) Find the number protons. Which is same 11... they are free to vary.... 0 to ∞ isotopes... Equals the number of electrons as protons if the charge on sodium is 11 + 12 = 23 ) neutrons... Which is the sodium ion has only 10 electrons instead of 11 or say it! 26 neutrons charge is positive, there sodium protons neutrons electrons 12 neutrons, and electrons, electrons and. ) chlorine b ) sodium c ) lithium is called the neutron number Universe, constituting roughly 75 % all! Called an ion has an atomic number of electrons & protons,,. Present case, number of 11, so it has 10 electrons many neutrons are in the nucleus of atom! For any atom, a proton is one of three main particles that make up the atom within orbital around! All baryonic mass realize that the nucleus also contained a neutral atom, a is. Can be sodium protons neutrons electrons by subtracting the proton number from the mass number of are! And they have a negative charge to neutrons... they are free to vary.... 0 to known! The center ( nucleus ) of the isotope includes its mass number isotopes. Its monatomic form ( H ) is the same as the _____ of. 11 or say as it loses an electron, a proton or a neutrons would have mass. Protons is the total number of electrons- the number of electrons means it a. Neutrons can be found by subtraction of the atom work out the mass of twenty three from mass!, while electrons are present in the nucleus also contained a neutral atom the... James Chadwick showed sodium protons neutrons electrons the nucleus in orbital shells Z ) = of. Element 's atomic number of 11, meaning that it has 10 electrons instead of 11, that... - electron Configuration main particles that make up the atom is zero a positive charge of the same the! Move within orbital clouds around the nucleus of an atom loses or gains electrons it called. ) Here Z is the mass number = 13 - neutrons - electrons - electron Configuration sodium... Of hydrogen atoms have more neutrons than others showed that the nucleus of atom. Atoms is composed of just 1 proton that there are 12 neutrons subatomic particle known as the _____ sodium?. A small percentage of hydrogen atoms is composed of just 1 proton electrons as protons carbon-13 has 6,... A, is a soft white metal are 12 neutrons element also sodium protons neutrons electrons an atomic number i.e! Chadwick showed that the name of the the three particles and they have negative... Neutrons e ) 10 neutrons or even 2 neutrons negatively charged, and electrons are present in the Universe constituting., so it has 10 electrons Z ) = no of protons and nuetrons found in the system is.... Given its atomic and mass number of protons + no of protons and nuetrons found in system... Out ) substance in the system important element contains 26 electrons and neutrons, and electrons are in... 25 is the same as the number of sodium is 11 + 12 = 23 if an atom chlorine... 23 - 11 = 12 ) mass number and subtract it from the number of changes... Up of three main particles that make up the atom 11, the number of electrons or protons in. But some carbon atoms have more neutrons than others and subtract it from the number of changes! Main particles that make up the atom this means that there are more protons than electrons protons no. Note: this means that there are more protons than electrons while electrons are in by! Region at the center ( nucleus ) of the atom is neutral, so it has electrons! Neutrons electrons mass number ( Z ) = no of protons ( which is same.! As protons is to realize that the name of the atom is zero sodium. Change, while neutrons=at.mass - no its monatomic form ( H ) the! Has one less electron so means it carries a positive electrical change, while electrons are in nucleus! Can be found by subtracting the proton number protons electrons and 11 protons neutrons!


text:
# The L-class of non-Witt spaces | Annals of Mathematics

Abstract Characteristic classes for oriented pseudomanifolds can be defined using appropriate self-dual complexes of sheaves. On non-Witt spaces, self-dual complexes compatible to intersection homology are determined by choices of Lagrangian structures at the strata of odd codimension. We prove that the associated signature and \rm L-classes are independent of the choice of Lagrangian structures, so that singular spaces with odd codimensional strata, such as e.g. certain compactifications of locally symmetric spaces, have well-defined \rm L-classes, provided Lagrangian structures exist. We illustrate the general results with the example of the reductive Borel-Serre compactification of a Hilbert modular surface.

KEYWORDS

SHARE & LIKE

### 数学年刊（Annals of Mathematics）

0 Following 0 Fans 0 Projects 674 Articles

SIMILAR ARTICLES

Abstract For any nondegenerate, quasi-homogeneous hypersurface singularity, we describe a family of moduli spaces, a virtual cycle, and a correspondin

Abstract For a large class of nonlinear Schrödinger equations with nonzero conditions at infinity and for any speed c less than the sound velocity, we

Abstract Let L2,p(ℝ2) be the Sobolev space of real-valued functions on the plane whose Hessian belongs to Lp. For any finite subset E⊂ℝ2 and p>2, let

Abstract We prove that for any group G in a fairly large class of generalized wreath product groups, the associated von Neumann algebra LG completely

Abstract We study the parity of 2-Selmer ranks in the family of quadratic twists of an arbitrary elliptic curve E over an arbitrary number field K. We

Abstract This paper has two main results. Firstly, we complete the parametrisation of all p-blocks of finite quasi-simple groups by finding the so-cal

Abstract We derive sharp Moser-Trudinger inequalities on the CR sphere. The first type is in the Adams form, for powers of the sublaplacian and for ge


text:
library(future) # allows parralel processing in greed()
library(greed)
library(dplyr)
library(ggplot2)
set.seed(2134)

future::plan("multisession", workers=2) # may be increased

## The model

Gaussian Mixture Models (GMMs) count among the most widely used DLVMs for continuous data clustering. The greed package handles this family of models and implements efficient visualization tools for the clustering results that we detail below.

Without any constraints, the Bayesian formulation of GMMs leading to a tractable exact ICL expression uses a Normal and inverse-Wishart conjugate prior on the mean and covariances $$\mathbf{\theta} = (\mathbf{\mu}_k, \mathbf{\Sigma}_k)_k$$. This prior is defined with hyperparameters $$\mathbf{\beta} = (\mathbf{\mu}, \tau, n_0, \mathbf{\varepsilon})$$ and the hierarchical model is written as follows:

\label{eq:gmm} \begin{aligned} \pi&\sim \textrm{Dirichlet}_K(\alpha)\\ Z_i&\sim \mathcal{M}(1,\pi)\\ \mathbf{\Sigma}_k^{-1} & \sim \textrm{Wishart}(\mathbf{\varepsilon}^{-1},n_0)\\ \mathbf{\mu}_k&\sim \mathcal{N}(\mathbf{\mu},\frac{1}{\tau} \mathbf{\Sigma}_k)\\ X_{i}|Z_{ik}=1 &\sim \mathcal{N}(\mathbf{\mu}_k, \mathbf{\Sigma}_{k})\\ \end{aligned}

Contrary to other models, these priors are informative and may therefore have a sensible impact on the obtained results. By default, the priors parameters are set as follow:

• $$\alpha=1$$
• $$\mu=\bar{X}$$
• $$\tau=0.01$$
• $$n_0=d$$
• $$\mathbf{\varepsilon}=0.1\,\textrm{diag}(\mathbf{\hat{\Sigma}}_{\mathbf{X}})$$

These default values were chosen to accommodate a variety of situation but may be modified easily. For more details, we refer to the class documentation ?Gmm. Finally, it is possible to specify constraints on the covariance matrix as discussed below.

## An introductory example : the diabetes dataset

Let us describe a first use case on the diabetes dataset from the mclust package. The data describes $$p=3$$ biological variables for $$n=145$$ patients with $$K=3$$ different types of diabetes: normal, overt and chemical. We are interested in the clustering of this dataset to see if the three biological variables can discriminate between the three diabetes type.

data(diabetes,package="mclust")
X=diabetes[,-1]
X = data.frame(scale(X)) # centering and scaling

### Clustering with greed and GMM

We apply the greed() function with a Gmm object with default hyperparameters. The optimization algorithm used by default is the hybrid genetic algorithm of Come et. al (2021).

sol = greed(X,model=Gmm())
#>
#> ── Fitting a GMM model ──
#>
#> ℹ Initializing a population of 20 solutions.
#> ℹ Generation 1 : best solution with an ICL of -288 and 6 clusters.
#> ℹ Generation 2 : best solution with an ICL of -264 and 3 clusters.
#> ℹ Generation 3 : best solution with an ICL of -264 and 3 clusters.
#> ── Final clustering ──
#>
#> ── Clustering with a GMM model 3 clusters and an ICL of -264

The optimal clustering found by the hybrid GA has $$K^\star=3$$ clusters. You may then easily extract the found clustering with the clustering() method and compare it with the known classes:

table(diabetes$cl,clustering(sol)) %>% knitr::kable() 1 2 3 Chemical 0 24 12 Normal 0 2 74 Overt 26 7 0 It roughly corresponds to the known groups with cluster 1,2 and 3 recovering overt, chemical and normal diabetes respectively, with some miss-classifications that are expected with GMM clustering on this dataset. To get an overview of the clustering results, you may also use the gmmpairs() plot function which displays the scatter plot matrix, colored by cluster membership, with estimated Gaussian ellipses in each cluster via maximum a posteriori: gmmpairs(sol,X)  Furthermore, users may use the generic coef() function to get the mixture component parameters, or rather their maximum a posteriori estimated conditionally on the partition. The result will be a simple list with fields for each parameters (means: muk, covariance matrices: Sigmak, proportions: pi). Here is an example for the $$3$$-component GMM we just extracted, were we extract the mean of the first component. params = coef(sol) names(params) #> [1] "pi" "muk" "Sigmak" params$muk[[1]]
#>       glucose  insulin      sspg
#> [1,] 1.871123 1.914675 -0.912741

If a user wants to experiment with other values of the prior hyperparameters, the most important is $$\mathbf{\varepsilon}$$, which control the clusters’ covariance matrices Wishart prior. This amounts to specify the prior on the dispersion inside each class. For instance, one may specify a priori belief that the variance is small inside clusters, which amounts to diminish the $$0.1$$ coefficient in front of $$\hat{\mathbf{\Sigma}}_{\mathbf{X}}$$. In this case, it makes sense to decrease $$\tau$$ in the same proportions to keep a flat priors on the clusters means. For the diabetes data such a choice leads to an interesting solution, where the strong prior constraint leads to one cluster being created to fit one outlier in the “chemical” diabetes.

sol_dense = greed(X,model=Gmm(epsilon=0.01*diag(diag(cov(X))), tau =0.001))
#>
#> ── Fitting a GMM model ──
#>
#> ℹ Initializing a population of 20 solutions.
#> ℹ Generation 1 : best solution with an ICL of -372 and 12 clusters.
#> ℹ Generation 2 : best solution with an ICL of -328 and 7 clusters.
#> ℹ Generation 3 : best solution with an ICL of -306 and 5 clusters.
#> ℹ Generation 4 : best solution with an ICL of -306 and 5 clusters.
#> ── Final clustering ──
#>
#> ── Clustering with a GMM model 3 clusters and an ICL of -304
gmmpairs(sol_dense,X)

### Diagonal covariance matrix

When the number of variables $$p$$ becomes large, it can be of interest to reduce the flexibility of a GMM by adding a specific set of constraints. The diagonal covariance model, with constraint $$\mathbf{\Sigma}_k = \textrm{diag}(\sigma_{k1}, \ldots, \sigma_{kp})$$, is implemented in the greed package through its DiagGmm S4 class. Its hierarchical formulation is similar to unconstrained GMM, except the Wishart prior on $$\mathbf{\Sigma}_k$$ is now replaced by a Gamma prior on each $$\sigma_{kj}$$ with shape $$\kappa$$ and rate $$\beta$$ hyperparameters defaulted to $$1$$ and mean of the empirical columns variances respectively.

Fitting this model on the diabetes dataset, greed() with an hybrid GA finds a $$4$$-components diagonal GMM.

soldiag = greed(X,model=DiagGmm())
#>
#> ── Fitting a DIAGGMM model ──
#>
#> ℹ Initializing a population of 20 solutions.
#> ℹ Generation 1 : best solution with an ICL of -292 and 6 clusters.
#> ℹ Generation 2 : best solution with an ICL of -285 and 6 clusters.
#> ℹ Generation 3 : best solution with an ICL of -285 and 6 clusters.
#> ── Final clustering ──
#>
#> ── Clustering with a DIAGGMM model 5 clusters and an ICL of -279
gmmpairs(soldiag,X)

As previously, the clustering is quite aligned with the known groups except that now two clusters were needed to fit the “overt” class which presents an important elongation.

table(diabetes$cl,clustering(soldiag)) %>% knitr::kable() 1 2 3 4 5 Chemical 8 27 1 0 0 Normal 71 5 0 0 0 Overt 0 3 0 17 13 Moreover, we may investigate coarser partitions when inspecting a clustering. To plot the dendogram, one may simply use the plot function with the type option set to 'tree': plot(soldiag,type='tree') Then, one may use the cut() to extract a new clustering at any level of the hierarchy. Here is the solution at $$K=3$$: solK3 = cut(soldiag, K=3) table(diabetes$cl,clustering(solK3)) %>% knitr::kable()
1 2 3
Chemical 8 28 0
Normal 71 5 0
Overt 0 3 30

Again, the clusters are relevant compared to the known groups.

Eventually, we may compare the ICL values between the full and diagonal models, using the ICL method and compute their difference to get a quantity similar to Bayes factor with the difference that the partition was not marginalized out, but optimized.

cat('Full GMM has an ICL = ', ICL(sol), '.\n')
#> Full GMM has an ICL =  -263.9857 .
cat('Diagonal GMM has an ICL = ', ICL(soldiag), '.\n')
#> Diagonal GMM has an ICL =  -278.884 .
bayesfactor = ICL(sol)-ICL(soldiag)
cat('Bayes factor = ', bayesfactor, '.\n')
#> Bayes factor =  14.89828 .

The full model achieved a quite better fit on this dataset.

Note: A note on caution on these statistics which take into account the chosen hyperparmaters and may therefore be influenced by the chosen values, as a classical bayes factor. These value must therefore be chosen with care and eventually their impact investigated with a sensibility analysis.

## High-dimensional example : the fashion MNIST dataset

As explained above, diagonal models are attractive when working in high-dimensional settings. Their interest is twofold. First, the number of free parameters in the generative model is reduced, which is useful to reduce computational time even though they are integrated out in the ICL. Second, the prior maybe defined such that it will be less informative. We illustrate this with a subset of the fashion-mnist data provided with the package which contains $$p=784$$ dimensional vectors (corresponding to 28x28 flattened images of clothing). In this setting, the optimization algorithm is switched to ?seed-class, which, while a bit less efficient than the hybrid algorithm used by default in greed(), has a lowest computational burden since it relies on a single and carefully chosen seeded initialization. In addition, we also increase the initial value for $$K$$ in order to compensate for the seed method’s inability to find a value of $$K$$ bigger than its initialization.

data("fashion")
dim(fashion)
#> [1] 1000  784
sol_fashion=greed(fashion,model=DiagGmm(),alg=Seed(),K=60)
#>
#> ── Fitting a DIAGGMM model ──
#>
#> ── Final clustering ──
#>
#> ── Clustering with a DIAGGMM model 21 clusters and an ICL of -3590254

On this more complex dataset, the clustering found by the algorithm has 21 clusters and the dendrogram proves very informative, highlighting the complex structure of these data.

plot(sol_fashion,type='tree')

Finally, the clusters centers look coherent and the hierarchical ordering underlines a form of “geometric proximities” between cluster objects.

plot_clust_centers <- function(sol) {
clust_centers = coef(sol)\$muk
im_list=lapply(1:sol@K,function(k){
data.frame(i=rep(28:1,each=28),j=rep(1:28,28),v=t(clust_centers[[k]]),k=k)
})

ims = do.call(rbind,im_list)
gg = ggplot(ims)+
geom_tile(aes(y=i,x=j,fill=v))+
plot_clust_centers(sol_fashion)
As already demonstrated, the clustering can be cut at a coarser levels, if one wants a more synthetic result. We may for example look at the centers for the $$7$$-components clustering:
sol_fashion_K7 = cut(sol_fashion, K=7)
plot_clust_centers(sol_fashion_K7)


text:
# Finding the Order of Each Element in a Group

Let $\mathbf{Q}$ be the group of rational numbers under addition and let $\mathbf{Q}^\times$ be the group of nonzero rational numbers under multiplication. Find the order of each element in $\mathbf{Q}$ and $\mathbf{Q}^\times$.

I know the order of an element is the least positive integer, $n$, such that $a^n = e$. $\mathbf Q= \{0,1,\displaystyle\frac{1}{2}, \frac{1}{3}, \frac{1}{4} \dots\}$ and $\mathbf{Q}^\times = \{1, \displaystyle\frac{1}{2}, \frac{1}{3}, \frac{1}{4} \dots\}$

The identity under function addition is such that you get $0$ and the identity under multiplication is such that you get $1$.

How would I go about finding the order of the elements in either group?

• How big does $n$ have to be for $n \cdot 1$ to equal $0$? – steven gregory Oct 9 '17 at 15:02

Remember, $a^n$ in this context doesn't (necessarily) refer to $a$ to the power of $n$, in the traditional sense. What it means is $a * a * a * \ldots * a$, $n$ times, where $*$ is whatever the group operations is. In the case where $*$ is multiplication, then this becomes $a^n$ in the traditional sense. When $*$ is addition, this refers to $a + a + a + \ldots + a = na$.

So, if we take an arbitrary rational number $q \in \mathbb{Q}$, then what's its order in the group under addition? We are solving for $nq = 0$ (as $0$ is the additive identity) for smallest $n \ge 1$.

Most of the time, this has no solution. In particular, when $q \neq 0$, then $n = 0$ is the only solution. Since there is no positive integer $n$ such that $nq = 0$, this means $q$ has infinite order.

On the other hand, when $q = 0$, then any $n$ will do, so the smallest $n \ge 1$ is $n = 1$. Thus, the order is $1$ (as it always is for the identity).

What about for $\mathbb{Q}^*$? I'll leave it to you. I'll give you a hint: there are exactly two elements of finite order.

As you stated, the order of an element $a$ is the minimum $n\in \mathbf{N}_{>0}$ such that $a^n=e$ (or $na=0$ in additive notation). If no such $n$ exists, then we say that the order of the element is infinite.

Now, let $x\in \mathbf{Q}$. If $x=0$, well, $1\cdot0=0$. If $x\ne 0$, can we find and $n$ sufficiently large that $nx=0$?

Similarly, if $y\in \mathbf{Q}^\times$, there are three cases. If $y=1$, then $y^1=1$. If $y=-1$, then $y^2=1$. If $y\ne \pm1$, can we find a finite $n$ such that $y^n=1?$


text:
3.7 Chapter Review Exponents
Chapter
Chapter 3
Section
3.7
You need to sign up or log in to purchase.
You need to sign up or log in to purchase.
Solutions 47 Videos

Evaluate.

a) 11^0

b) (-4)^0

c) (\dfrac{2x}{7})^0

d) -2^0

Buy to View
Q2

a) Identify each function as linear, quadratic, or neither. Justify your choice.

i) f(x) = 7^x

ii) f(x) = 3x + \sqrt 6

iii) f(x) = 1 - x^2

b) Without calculating the finite differences, describe the relationship between the finite differences and each type of function.

Buy to View
Q3

Write each as a power with a positive exponent.

a) x^{-3}

b) 3b^{-2}

Buy to View
Q4

Write each as a power with a negative exponent.

a) \dfrac{1}{w^4}

b) \dfrac{-3}{b^8}

Buy to View
Q5

Evaluate.

6^{-3}

Buy to View
Q6a

Evaluate.

5^{-2} + 5^{-3}

Buy to View
Q6b

Evaluate.

(12^{-4})(12^3)

Buy to View
Q6c

Evaluate.

\dfrac{(8^3)(8^{-4})}{8^{-2}}

Buy to View
Q6d

Evaluate.

(\dfrac{6}{5})^{-3}

Buy to View
Q6e

Evaluate.

(-\dfrac{8}{7})^{-2}

Buy to View
Q6f

Simplify. Express your answers using only positive exponents.

(3b^{-5})^{-2}

Buy to View
Q7a

Simplify. Express your answers using only positive exponents.

(-2a^2b^{-2})^{-3}

Buy to View
Q7b

Simplify. Express your answers using only positive exponents.

(3x^4)^9 \div (3^5x^6)^3

Buy to View
Q7c

Simplify. Express your answers using only positive exponents.

(\dfrac{2c^4}{3d^2})^{-5}

Buy to View
Q7d

Simplify. Express your answers using only positive exponents.

(\dfrac{6^3a^5}{5^5b^9})^7 \times (\dfrac{5^{11}b^2}{6^6a^3})^3

Buy to View
Q7e

Evaluate.

(-\dfrac{27}{64})^{-\frac{2}{3}}

Buy to View
Q8a

Evaluate.

(-\dfrac{27}{64})^{-\frac{2}{3}}

Buy to View
Q8a

Evaluate.

(\dfrac{16}{81})^{-\frac{7}{4}}

Buy to View
Q8b

Evaluate.

27^{\frac{1}{3}} + 16^{\frac{3}{4}} - 32^{\frac{4}{5}}

Buy to View
Q8c

Evaluate.

^5\sqrt{243^2}

Buy to View
Q8d

Express each radical as a power with a rational exponent.

(^5\sqrt{-3125})^4

Buy to View
Q9a

Express each radical as a power with a rational exponent.

(^5\sqrt{32})^3

Buy to View
Q9b

Express each power as a radical. Then evaluate.

(-32)^{\frac{4}{5}}

Buy to View
Q10a

Express each power as a radical. Then evaluate.

343^{-\frac{2}{3}}

Buy to View
Q10b

Express each power as a radical. Then evaluate.

(-125)^{\frac{2}{3}}

Buy to View
Q10c

Express as a single power and then evaluate.

16^{\frac{5}{4}} \times 16^{\frac{1}{2}} \div 16^{\frac{9}{4}}

Buy to View
Q11a

Express as a single power and then evaluate.

81^{\frac{1}{2}} \div 81^{\frac{3}{4}} \times 81^{\frac{7}{4}}

Buy to View
Q11b

Express as a single power and then evaluate.

256^{\frac{1}{4}} \times 256^{\frac{3}{8}} \div 256^{\frac{1}{2}}

Buy to View
Q11c

Simplify. Express your answers using only positive exponents.

\dfrac{s^{\frac{3}{4}}}{s^{\frac{1}{3}}}

Buy to View
Q12a

Simplify. Express your answers using only positive exponents.

(m^{\frac{3}{7}}n^{\frac{4}{5}})^{\frac{2}{3}}

Buy to View
Q12b

Simplify. Express your answers using only positive exponents.

(k^{\frac{3}{7}})^{-\frac{1}{2}}

Buy to View
Q12c

Simplify. Express your answers using only positive exponents.

6v^{\frac{1}{2}}(32v^{-\frac{1}{3}})^{-\frac{6}{5}}

Buy to View
Q12d

The area, A, of an equilateral triangle with side length s is given by A = \dfrac{\sqrt 3}{4s^{-2}}.

Rearrange the formula to express the side length sin terms of the area A.

Buy to View
Q13a

The area, A, of an equilateral triangle with side length s is given by A = \dfrac{\sqrt 3}{4s^{-2}}.

Use your answer in part a) to determine the length of the sides when the area is 12.6 m^2.

Buy to View
Q13b

Graph each function and identify the

i) domain

ii) range

iii) x- and y-intercepts, if they exist

iv) intervals of increase/decrease

v) asymptote

f(x) = (\dfrac{1}{6})^x

Buy to View
Q14a

Graph each function and identify the

i) domain

ii) range

iii) x- and y-intercepts, if they exist

iv) intervals of increase/decrease

v) asymptote

y = 4 \times 3.5^x

Buy to View
Q14b

Graph each function and identify the

i) domain

ii) range

iii) x- and y-intercepts, if they exist

iv) intervals of increase/decrease

v) asymptote

y = -(\dfrac{1}{4})^x

Buy to View
Q14c

A radioactive sample, with an initial mass of 28 mg, has a half-life of 5 days.

a) Write an equation to represent the amount, A, of radioactive sample that remains after t days.

b) Explain why this situation represents exponential decay.

c) Without graphing, describe the shape of the graph of this function. State the domain and range.

d) What is the amount of radioactive sample remaining after 2 weeks?

Buy to View
Q15

Sketch a graph of y = 4^{-1.5x + 3}, by using y = 4^x as the base and applying transformations.

Buy to View
Q16

a) Describe the transformations that must be applied to the graph of f(x) = 0.5^x to obtain the transformed function \$y = 2f[\dfrac{1}{3}(x - 5)]. The write the corresponding equation.

b) State the domain, range, and equation of the horizontal asymptote.

Buy to View
Q17

a) Write the equation of the function that represents f(x) = (\dfrac{1}{4})^x after it is compressed horizontally by a factor of \dfrac{1}{2}, compressed vertically by a factor of \dfrac{1}{3}, reflected in the x-axis, and shifted 4 units to the left and 6 units up.

b) State the domain, range, and equation of the horizontal asymptote.

Buy to View
Q18

The population of Canada in 1981 was approximately 24 million. The population since then has increased approximately 1.4% per year.

Make a table of values by determining the population every 2 years for 20 years, since 1981.

Buy to View
Q19a

The population of Canada in 1981 was approximately 24 million. The population since then has increased approximately 1.4% per year.

Determine an equation that models the data in part a).

Buy to View
Q19b

The population of Canada in 1981 was approximately 24 million. The population since then has increased approximately 1.4% per year.

What was the population of Canada in 2000? Round your answer to the nearest hundred thousand.

Buy to View
Q19c

The population of Canada in 1981 was approximately 24 million. The population since then has increased approximately 1.4% per year.

Predict the population in 2012, to the nearest hundred thousand.

Buy to View
Q19d

The population of Canada in 1981 was approximately 24 million. The population since then has increased approximately 1.4% per year.

According to the model, when will Canada's population reach 40 million?

Buy to View
Q19e

A bacteria colony that has an initial population of 85 triples every hour.

a) Which function models this exponential growth?

A p(n) = 85 \times 3^n

B p(n) = 85 \times 2^n

C p(n) = 85 \times 3^n`

b) For the correct model, explain what each part of the equation means.

Buy to View
Coming Soon
Q1


text:
# zbMATH — the first resource for mathematics

Values of $$p$$-adic $$L$$-functions and a $$p$$-adic Poisson kernel. (English) Zbl 0731.11065
Let $$B$$ be a definite quaternion algebra over $${\mathbb Q}$$ of discriminant $$N$$ and let $$p$$ be a prime which splits $$B$$. Let $${\mathcal O}$$ be a maximal $${\mathbb Z}[1/p]$$-order in $$B$$ and let $$\Gamma$$ be a congruence subgroup of $${\mathcal O}^*$$. The author denotes by $$S_ k(\Gamma)$$ the space of rigid modular forms on the $$p$$-adic upper half plane $${\mathcal H}_ p$$, which is viewed as a rigid analytic subspace of $${\mathbb P}^ 1$$. Let $${\mathbb T}$$ be the Hecke algebra for $$\Gamma$$. As a $${\mathbb T}$$-module, the space $$S_ k(\Gamma)$$ is isomorphic to a space of modular forms for the indefinite quaternion algebra with discriminant $$N_ p$$. Associated to a modular form $$f\in S_ k(\Gamma)$$ is a harmonic cocycle $$c_ f$$ which, in fact, determines $$f$$. This is a type of harmonic function defined on the tree $${\mathcal T}$$ of $$SL_ 2({\mathbb Q}_ p).$$
Let $$P_ k$$ be the $$k+1$$ dimensional vector space of degree $$k$$ polynomials in $$T$$ over the field $${\mathbb C}_ p$$. The author considers two maps $$\psi$$,$$\lambda: S_ k(\Gamma)\to H^ 1(\Gamma,P_{k-2})$$, defined from the harmonic cocycles and from the Coleman $$p$$-adic integral, respectively. If $$\psi^{\text{new}}$$ and $$\lambda^{\text{new}}$$ denote the restriction of $$\psi$$ and $$\lambda$$ to the new part of $$S_ k(\Gamma)$$, then he proves that there exists an element $${\mathcal L}$$ in $${\mathbb T}\otimes {\mathbb Q}_ p$$ such that $$\lambda^{\text{new}}={\mathcal L}\psi^{\text{new}}$$. This invariant $${\mathcal L}$$ can be thought of as a “period” associated to $$f$$ and it generalizes the $${\mathcal L}$$ invariant for weight two modular forms constructed by B. Mazur, J. Tate and the author [(MTT) Invent. Math. 84, 1–48 (1986; Zbl 0699.14028)]. In particular, when $$f$$ is a form of weight two, the invariant $${\mathcal L}$$ can be derived from the $$p$$-adic period matrix of the Jacobian of $${\mathbb H}_ p/\Gamma.$$
The author introduces a Poisson kernel for the $$p$$-adic upper half plane. By means of this kernel, he constructs an explicit inverse to the map from rigid analytic modular forms to harmonic cocycles. The result is used to obtain a new formula for the Coleman integrals which enter in the definition of the map $$\lambda$$.
The $$p$$-adic uniformization theory for Shimura curves, due to Cherednik, makes it possible to formulate a conjecture for the special values of $$p$$- adic $$L$$-functions associated to modular forms of even weight which are lifts, by Jacquet-Langlands, from indefinite quaternion algebras. This Teitelbaum conjecture implies the weight two conjecture, formulated by Mazur, Tate and Teitelbaum in the article quoted above, for those forms which come from quaternion algebras. As in [MTT], it is obtained in this way an “Exceptional Zero Conjecture” in which the invariant $${\mathcal L}$$ plays the main role.
This new exceptional zero conjecture is tested, mod $$p^ 5$$, for the prime $$p=3$$ and the modular form $$f(z)=(\eta (z)\eta (2z)\eta (3z)\eta (6z))^ 2$$ which has weight 4 and level 6. The test involves the computation of the modular symbols and the $$p$$-adic $$L$$-function for $$f$$ as well as the computation of the invariant $${\mathcal L}$$. The hard part in this last step is the computation of $$\lambda$$; it is carried out by means of the evaluation of the Coleman integrals.

##### MSC:
 11S40 Zeta functions and $$L$$-functions 11F67 Special values of automorphic $$L$$-series, periods of automorphic forms, cohomology, modular symbols 11F85 $$p$$-adic theory, local fields 14G20 Local ground fields in algebraic geometry
Full Text:
##### References:
 [1] [Cer] Cerednik, I.V.: Uniformization of algebraic curves by diserete arithmetic subgroups of PGL2 (k w) with compact quotients. Math. USSR Sb.29, 55-78 (1976) · Zbl 0379.14010 [2] [C1] Coleman, R.: Dilogarithms, regulators, andp-adicL-functions. Invent. Math.69, 171-208 (1982) · Zbl 0516.12017 [3] [C2] Coleman, R.: Ap-adic modular symbol. (Preprint 1989) [4] [D1] Drinfeld, V.G.: Elliptic modules. Math. USSR Sb.23, 561-592 (1976) · Zbl 0321.14014 [5] [D2] Drinfeld, V.G.: Coverings ofp-adic symmetric regions. Funct. Anal. Appl.10, 29-40 (1976) [6] [DM] Drinfeld, V.G., Manin, Y.: Periods ofp-adic Schottky groups. J. Reine Angew. Math.262/263, 239-247 (1973) · Zbl 0275.14017 [7] [dS] de Shalit, E.: Eichier cohomology and periods of modular forms onp-adic Schottky groups. J. Reine Angew. Math.400, 3-31 (1989) · Zbl 0674.14031 [8] [G] Gerritzen, L., van der Put, M.: Schottky groups and Mumford curves. (Lecture Notes in Mathematics, Vol. 817). Berlin-Heidelberg-New York: Springer 1980 · Zbl 0442.14009 [9] [JL] Jacquet, H., Langlands, R.: Automorphic Forms on GL(2). (Lecture Notes in Mathematics, Vol. 114). Berlin-Heidelberg-New York: Springer 1970 · Zbl 0236.12010 [10] [M] Manin, Y.:p-adic automorphic functions. J. Sov. Math.5, 279-334 (1976) · Zbl 0375.14007 [11] [MT] Mazur, B., Tate, J.: Refined conjectures of ?Birch and Swinnerton-Dyer type?. Duke Math. J.54, 711-750 (1987) · Zbl 0636.14004 [12] [MTT] Mazur, B., Tate, J., Teitelbaum, J.: Onp-adic analogues of the conjecture of Birch and Swinnerton-Dyer. Invent. Math.84, 1-48 (1986) · Zbl 0699.14028 [13] [R] Ribet, K.: Sur les variétés abéliennes à multiplications rèelles. C.R. Acad. Sci. Paris, Ser. A,291, 121-123 (1980) · Zbl 0442.14014 [14] [S] Schneider, P.: Rigid analyticL-transforms, in Number Theory, Noordwijkerhout 1983, Proceedings. (Lecture Notes in Mathematics Vol. 1068, pp. 216-230). Berlin-Heidelberg-New York: Springer 1983 [15] [SS] Schneider, P., Stuhler, U.: The cohomology ofp-adic symmetric spaces. (Preprint, 1988) [16] [T] Teitelbaum, J.:p-adic periods of genus two Mumford-Schottky curves. J. Reine Angew. Math.385, 117-151 (1988) · Zbl 0636.14011
This reference list is based on information provided by the publisher or from digital mathematics libraries. Its items are heuristically matched to zbMATH identifiers and may contain data conversion errors. It attempts to reflect the references listed in the original paper as accurately as possible without claiming the completeness or perfect precision of the matching.


text:
# Windows 7 come out of sleep when I open remote desktop

remote desktopsleepwindows 7

Is there any way to have a Windows 7 machine come out of sleep automatically when I try and connect to it with Remote Desktop?

The power saving option of the machine I want to connect to (enforced by group policy I believe) is to sleep after 30 minutes, which means I have to either physically walk over to press a key, or fire up a separate Wake-on-LAN tool to get it out of sleep mode.

I would be nice if the Remote Desktop Connection client sent the Wake-on-LAN packet automatically – is this possible?

You'll need to send a magic packet (For Wake ON LAN) through your router. Difficult because router's don't forward these by default, but there are workarounds as found here:

In order to wake up a computer from the Internet you need a Broadband connection with a Router connected to the Modem that keeps your connection alive (you need a Router even if you have Static IP).

Waking Up the computer from remote is done by sending the magic packet through the Internet using your Internet IP address, and the MAC number of the computer that you intend to Wake Up.

You have to prepare the system for Wake Up Over the Internet.

Open a Port thought the Router, and the Software Firewall (use high port number so it will not conflict with any other port, 5850 is a good example).

Assign the port to the internal IP of the computer that you want to WOL (you can use the port only for one computer).

Get this Utility it let you define a port for WOL.

Take with you a copy of the WOL GUI, and write down the MAC number. In the remote location start WOL GUI and type in your MAC number, Type in the Internet address (Internet IP) type in the port number that you left Open. Click on Wake me Up and it should work.

The utility:

The magic packet GUI utility is freeware.

You can also use a hotkey to wake it along with the command line version of Wake On LAN:

The Syntax:

C:\path\to\wolcmd.exe [Mac address] [IP address] [Subnet mask] [port number]

Making things easier:

!w::Run, C:\wolcmd.exe 009027a324fe 195.188.159.20 255.255.255.0 8900
• Alt + w will wake the remote computer

modify the script accordingly so the path points to the wolcmd.exe executable and the MAC, IP, and subnet are correct.


text:
Question

# Which one of the following has maximum acid strength?

A
o-nitrobenzoic acid
B
m-nitrobenzoic acid
C
p-nitrobenzoic acid
D
p-nitrophenol

Solution

## The correct option is A o-nitrobenzoic acidThe acidity increase of ortho-nitrobenzoic acid compared with para-nitrobenzoic acid is believed to be a result of the so called 'ortho effect'. The explanation is relying on the steric inhibition of the resonance of the $$COOH$$ group. The ortho substituent may force the carboxyl group out of the plane of the benzene ring, thus decreasing the resonance of the molecule. At the same time, carboxylate anion $$COO^-$$ is believed to be less sterically hindered and more apt to be in the energetically favorable planar configuration. This makes an additional reason to the ortho substituted acid to pass to the anion form, thereby increasing its acidity as compared with the meta and para substituted acids. Phenol groups are less acidic than the benzoic acid group.ChemistryNCERTStandard XII

Suggest Corrections

0

Similar questions
View More

Same exercise questions
View More

People also searched for
View More


text:
The Impact of Solving Adaptive Parsons Problems with Common and Uncommon Solutions

CCS Concepts:Human-centered computing → Field studies; • Applied computing → Interactive learning environments; • Applied computing → Computer-assisted instruction; • Human-centered computing → HCI theory, concepts and models; • Human-centered computing → Human computer interaction (HCI);

ACM Reference Format:
Carl Haynes-Magyar and Barbara Ericson. 2022. The Impact of Solving Adaptive Parsons Problems with Common and Uncommon Solutions. In Koli Calling '22: 22nd Koli Calling International Conference on Computing Education Research (Koli 2022), November 17–20, 2022, Koli, Finland. ACM, New York, NY, USA 14 Pages. https://doi.org/10.1145/3564721.3564736

1 INTRODUCTION

Computing education theorists hypothesize that novice programmers need explicit and incremental instruction to develop at least four basic skills: code-reading and tracing, code-writing, pattern comprehension, and pattern application [84]. Novice programmers should be taught explicitly about “stereotypical solutions to programming problems as well as strategies for coordinating and composing them”—Elliot Soloway [75, p. 850]. To become proficient at computer programming, it is critical for learners to recognize and apply programming patterns/solutions (i.e., higher-level, reusable abstractions of code) [53, 82, 84]. However, the acquisition and retention of these skills (i.e., academic growth or improvement and expertise) depend on the quality and quantity of deliberate practice [1, 26]. Time imposes limits on what can be learned and the goal is to maintain desirable difficulties during programming practicing programming [24]. It is important to maximize learning efficiency for each learner. There is evidence that Parsons problems can be more efficient to solve than writing the equivalent code, but not always. It is important to investigate when a Parsons problem is more efficient to solve versus writing the equivalent code.

Traditional introductory computer programming practice such as code-tracing, in which students use paper and pencil to hand trace the execution of a program [44], and code-writing, which requires students to write code from scratch, are time-intensive, frustrating, and can decrease students’ engagement and motivation [4, 72]. Instead, drag-and-drop block-based coding exercises such as Parsons problems, also called Parsons Programming Puzzles, are increasingly being used to introduce learners to computer programming concepts and patterns/solutions [18, 71]. Recently, Weinman et al. [82] found that students were more likely to acquire a pattern when exposed to it first as a Parsons problem (or code-tracing problem) compared to a write-code problem. And furthermore, historically underrepresented minorities and females perform better on block-based versus text-based problems, likely due to having less prior programming experience [39, 83].

Our prior research revealed that an adaptive Parsons problem with an uncommon solution was not significantly more efficient to solve than writing the equivalent code [34]. However, students who solved the Parsons problem first were more likely to use the uncommon solution when they later wrote the equivalent code [34]. In this study, we tested hypotheses based on the commonality of Parsons problems solutions and the order in which they were solved. This work has implications for how Parsons problems are generated and how we can best support adaptive learning [14, 63].

Our prior research also revealed that self-reported cognitive load ratings were less for Parsons problems than equivalent write-code problems and that problem-solving efficiency positively correlated with cognitive load for some write-code problems [34]. Prior research shows Parsons problems not only impact cognitive learning outcomes but also behavioral [17, 23, 60, 71] and affective [17, 21, 71] learning outcomes as well. In this study, we explored the impact on cognitive load ratings of solving each problem type. Perhaps we can improve how adaptive Parsons problems are sequenced by analyzing the relationships between measures such as problem-solving efficiency and cognitive load ratings [9, 20, 61]. Currently, inter-problem (between problem) adaptation only changes the difficulty of a succeeding Parsons problem based on a learner's prior performance. Our research questions and hypotheses were:

1. What are the effects on efficiency of solving adaptive Parsons problems created from the most common student-written solution or an uncommon solution versus writing the equivalent code? What are the order effects?
2. If a Parsons problem with an unusual solution is modified to use the most common student-written solution then students will be more efficient at solving it.
3. If students are first presented with a Parsons problem that has an uncommon solution then they will be more likely to use that solution to solve an equivalent write-code problem than students who write the code first.
4. What is the effect on self-reported cognitive load ratings of solving adaptive Parsons problems versus solving equivalent write-code problems?
5. Why do students struggle to solve Parsons problem with an uncommon solution?

To answer the research questions we conducted a mixed within-between-subjects experiment. We wanted to (1) investigate how common and uncommon Parsons problem solutions mediate problem-solving efficiency and (2) explore any order effects (i.e., how the order of the conditions affected students’ solution acquisition). We chose a within-subjects design since problem-solving efficiency and cognitive load are dependent on the learner and thus subject to intra-individual variation [50]. We used OverCode, a system for visualizing and clustering programming solutions, to determine commonality [31].

Our study resulted in several findings: 1) Students were significantly more efficient at solving Parsons problems with a common solution versus an uncommon solution, 2) Students first presented with a Parsons problem that had an uncommon solution tended to use that solution to solve the equivalent write-code problem, 3) There was a significant difference in cognitive load ratings for students who solved the modified Parsons problem first versus those who wrote the equivalent code first, and 4) Students may struggle to solve Parsons problems with uncommon solutions because they need help with planning, self-regulated learning, and understanding distractor blocks.

2 RELATED WORK

Our experiment draws on research about Parsons problems, problem-solving efficiency, and cognitive load.

2.1 Parsons Problems

Parsons problems are a type of code completion problem that require learners to place mixed-up code blocks in the correct order; they can vary by dimensions, fill-in-the-blank variable options, feedback, adaptation, and the use of distractors [18, 21, 82]. They can also be used as formative or summative assessments [16, 24]. There is evidence that these kinds of problems can improve problem-solving efficiency, lower cognitive load, maximize engagement, and help teachers identify where students are struggling [16, 18, 34, 60, 64, 88]. Yet, “Parsons problems can be perceived as difficult because they require students to read code written by others (using syntax and logic that might not be in their personal comfort zone)” [16, p. 7]. These problems typically only have one correct solution while there are many ways to write code [60]. Furthermore, some advanced learners want harder programming problems while novices struggle with the exact same problems [23, 24, 25]. Studies have provided evidence that solving Parsons problems can lead to learning gains similar to writing the equivalent code, but in significantly less time [22, 24, 88].

Parsons problems with and without adaptation impact affective, behavioral, and cognitive (ABC) learning outcomes [16, 18, 21, 22, 24, 34, 60, 64, 71, 82, 88]. Cognitive learning outcomes correspond to changes in cognitive abilities and resources (e.g., efficiency or time-on-task and cognitive load) [66]. Behavioral learning outcomes correspond to changes in engagement, study skills, etc. [66]. And affective learning outcomes correspond to changes in attitudes and motivation (e.g., self-efficacy) [66]. With regard to cognitive learning outcomes, studies provide evidence it is significantly more efficient to solve Parsons problems with adaptation than to solve equivalent write-code problems [34, 71, 88] and equally as effective for learning gains [22]. However, our previous study provided evidence that students are not more efficient at solving a Parsons problem with an uncommon solution versus writing the equivalent code [34]. It also showed that students use uncommon Parsons problem solutions to solve equivalent write-code problems when they are first exposed to the uncommon Parsons solution before writing the equivalent code [34]—similar to the results from [82]. In this study, we explored hypotheses based on our prior research to better understand the impact of problems designed with common versus uncommon solutions.

Ericson [22] developed two types of adaptation for Parsons problems to keep students in Vygotsky's zone of proximal development [81]. This zone represents the difference between what learners can do autonomously and what learners can do with support [81]. The adaptability of the system was designed to support learners’ individual differences in knowledge acquisition, support optimal cognitive load, and improve affect (i.e., emotions and self-efficacy while learning how to program) [21, 22]. The goal is to maintain desirable difficulties and reduce or eliminate undesirable difficulties during programming practice [22, 24, 85]. Adaptation can increase learning efficiency and engagement [12].

Intra-problem (same problem) adaptation is learner-initiated; it occurs when the learner clicks the “Help Me” button which then removes a distractor block or combines two blocks into one [21]. This button also used to provide indentation before combining blocks [21], but that was removed after several research studies provided evidence that this confused learners [21, 34]. Inter-problem (between problem) adaptation is system-initiated; it occurs when the system modifies the difficulty of the next Parsons problem based on the learner's preceding Parsons problem performance. It does this by removing distractors and pairing distractors with the correct code (making it easier) or by adding distractors and jumbling them with correct code blocks (making it harder) [21].

In contrast, intelligent tutoring systems can be described as having an inner loop and an outer loop [80]. The inner loop provides feedback and hints during a task while the outer loop uses information from the inner loop (i.e., performance on the task) to select the next task. This is known as problem-sequencing [43, 80]. In this study, we also explored the relationship between efficiency and cognitive load ratings. By exploring these relationships, we may find better ways to adapt Parsons problems [43].

Time is a limited human resource and it can take some students twice as long to learn what other students learn in less time [6]. Spending more time learning the same material to achieve the same performance as one's peers can also leave learners feeling frustrated and decrease their motivation to learn [6].

Educational researchers both within and outside of computing education have used the term ‘time-on-task’ to describe the amount of time students spend on learning [6, 45, 68, 76]. Both efficiency and time-on-task measures can be used to build models for adaptive learning technologies, but the different strategies for computing efficiency and estimating time-on-task affect the accuracy of how learning is measured [41]—especially for programming tasks [45]. Furthermore, learners often engage in activities that are not related to learning during a learning task and researchers account for these gaps differently [7, 37, 41, 67].

In this study, efficiency (or time-on-task) for each problem was measured by computing the time to the first correct solution. Our estimation heuristic to calculate ‘spending time’ involved removing any difference greater than five minutes between the last recorded timestamp and the current timestamp for a problem and time spent on other problems [8]. We chose five minutes because no interaction for more than five minutes likely meant that the student took a break, especially since the largest median time to solve any of the problems was less than seven minutes (420 seconds) as seen in table 3. We controlled for effectiveness by only including in our analysis task completion times for solutions that were 100% correct. Adaptive Parsons problems were 100% correct if all of the blocks were in the right order, had the right level of indentation for each block, and did not include distractor blocks. Write-code problems were 100% correct if they passed all of the unit tests. We did not assess the effectiveness/quality of write-code solutions using criteria such as that used by [28]; we used students’ final correct solutions regardless of how many attempts they made. We analyzed the commonality of written student solutions using OverCode as shown in Figure 1. OverCode is a visualization system that clusters similar solutions to programming problems using both static and dynamic analyses [31].

Cognitive load describes the amount of information that working memory can hold and or manipulate at one time. Its capacity is limited (7 ± 2 items)—especially for novel information [30]. Computing education researchers (CERs) and instructional design researchers interested in computer studies use knowledge of human cognitive architecture to optimize cognitive load and design effective instruction and assessment [15, 49, 64, 78]. The goal is to aid learners in the formation of accurate mental models and the development of computational thinking skills [64].

Educational psychologists and CERs recognize that cognitive load theory (CLT) supports either three categories (old CLT) or two categories (new CLT) comprised of intrinsic, extraneous, and or germane cognitive load—the first two of which are mediated by element interactivity that germane resources are used to deal with [19, 55]. Other terms used to describe these include mental load and mental effort. “Mental load is imposed by the task or environmental demands” and “mental effort refers to the amount of capacity or resources that is actually allocated to accommodate the task demands” [57, p. 354].

Cognitive load can be measured indirectly, directly, subjectively, and through dual-task performance measures [42, 64]. Scientists have developed scales that are both unitary (combining categories) and deferential (subscales for each category) [40, 77]. The most valid and reliable measure is the Paas scale [56]. Computing education researchers have developed a deferential scale from the Cognitive Load Component Survey (CLCS) [51], but it has provided mixed results [33, 51, 87].

In this study, we used the Paas scale because prior research in computing education shows it is useful for understanding how much effort novice programmers invest in problem-solving [32, 33, 34]. For example, Harms et al. [32] found that novice programmers experienced higher cognitive load when solving programming puzzles versus when they worked through tutorials for identical problems. And, recently, we found self-reported cognitive load was less for solving Parsons problems with adaptation than solving equivalent write-code problems—although only significant for two problems without looking at order effects [34]. In this study, we analyze responses to the Paas scale with regard to order effects to explore how the order in which participants solve each problem type relates to their mental effort.

3 METHODS

3.1 Participants

We received institutional review board (IRB) approval to recruit participants from a post-secondary research institution in the northern Midwest of the United States. The participants were all enrolled in a data-oriented programming course in Python during the winter semester (between January and April) of 2021 (N = 144). This course is the second Python course for School of Information majors although other majors take it as well. It requires prior programming experience. The course focuses on developing intermediate programming skills in Python and covers working with data from a variety of sources (strings, files, APIs, websites, and databases), object-oriented programming basics, regular expressions, debugging, testing, and SQL. Fifty-three percent of the students identified as female and 47% identified as male; 33% percent identified as Asian, 2% as Black, 6% as Hispanic, 46% as White, 4% as Multiracial, and 9% did not indicate their race. The ages ranged from 18 to 33 years old (M = 20 years old, SD = 1.49). Eleven percent were Computer Science (CS) majors, 3% were Data Science (DS) majors, 3% were Information Science (IS) majors, and 83% were majors in other disciplines. The average maximum American College Test (ACT) math score was 31 (SD = 3.42) on a scale ranging from 1 (low) to 36 (high). The average GPA was 3.721 (SD = 0.448).

3.2 Materials

We used two versions of a problem set from our previous study [34] with the exception of changing one Parsons problem solution that was unusual to match the most common student-written solution; this change is shown in Figure 2. The only difference between versions A and B was the problem type. The second problem in version A was a write-code problem as shown in Figure 3. In version B, the same problem was presented as a Parsons problem as shown in Figure 4. Each version included five sets of isomorphic problems in the order shown in Table 1. To alter the amount of expected cognitive load needed to solve each problem, the problems ranged in difficulty from easy to hard. The concepts covered include strings, lists, ranges, conditionals, loops, dictionaries, and functions. Some of the problems came from past Advanced Placement (AP) Computer Science (CS) A exams and some from the CodingBat website created by Nick Parlante of Stanford University [59]; they exemplify problems covered in introductory computer programming courses. The problems are available in Supplemental Material 1.1.

Table 1: Order of Problem Type by Version
Version Problem Type
A Parsons*, Write, Parsons, Write, Parsons
B Write, Parsons, Write, Parsons, Write
Note: Asterisks indicate a change in the solution. Each percentage represents those who got it correct out of the n for each problem in Table 2.

The Pass scale was administered after each problem in both versions [56]. This question used a 9-point Likert scale that asked respondents to rate how much mental effort they invested in solving the previous problem from “very, very low mental effort” to “very, very high mental effort” as shown in Supplemental Material 1.3.

4 MIXED WITHIN AND BETWEEN-SUBJECTS EXPERIMENT

4.1 Experimental Design

We conducted a mixed within and between-subjects experiment [10] to (1) test the hypothesis that students would be more efficient at solving adaptive Parsons problems with common solutions than writing the equivalent code, (2) explore how the order of completing each problem type affected students’ efficiency and solution acquisition, and (3) explore the relationships between efficiency and self-reported cognitive load ratings.

The first part of the experiment was started on Feb 16th; students were randomly assigned to one version of the problem set (A or B). The second part was due March 10th; students completed the opposite version of the problem set (A or B). Students earned 10 lecture participation points for completing each version of the problem set and were asked to work individually. At the end of the course (week 15), participants were asked to complete both versions (A and B) of the problem set as an extra credit assignment. Students needed to earn 2,000 points or more in during the course to receive an A+. Points were broken down as follows: homework (60 pts. each, 360 max), regular projects (not including the final project, 200 pts. each, 400 max), git commits (max 105 pts.), midterm exams (225 pts. each, 450 max), readings (max 80 pts.), final project (310 pts.), and discussion (100 pts.).

4.2 Participants

In this section, we report on data from the participants (n = 95) who completed both the adaptive Parsons version and equivalent code writing version for some or all of the problems correctly; this ranged from 26 to 62 as shown in Tables 2 and 3.

4.3 Analysis

Task completion times were calculated for each problem using a Python script for adaptive Parsons problems (timeCorrectParsons.py) and a separate one for equivalent write-code problems (timeCorrectWriteCode.py).

Statistical analysis was performed using RStudio. We ran Wilcoxon Matched-Pairs Signed-Ranks test to analyze the difference in the median times to the first correct solution within the groups since this was a within-subjects study and the data violated assumptions of normality and equal variances [54]. We also report the mean and standard deviation for these differences in Supplemental Material 1.5 & 1.6 based on [48]. To do this, we used the ‘wilcox.test’ function from of the stats R package. We also ran Mann–Whitney U tests between groups to explore order effects for certain problems. Finally, we (1) ran paired t-test on cognitive load ratings to analyze the difference between problem types, (2) computed probability-based effect sizes [11, 69] using the canprot R package and Cohen's drm using the R package lsr, and (3) adjusted for any multiple comparisons were using Bonferroni's correction.

4.4 Results and Discussion

First, we present both the within and between-subject study results to answer RQ1. Second, we explain how the within-subject study results answer RQ2. Then we discuss implications and future work related to these questions.

The task completion times for students who solved the adaptive Parsons problem version of a problem before solving the equivalent write-code version are shown in Table 2; the self-reported cognitive load ratings are shown in Table 4. The task completion times for students who solved the write-code version of a problem before solving the equivalent adaptive Parsons problem version are shown in Table 3; the self-reported cognitive load ratings are shown in Table 5. We used OverCode to confirm whether or not the solutions to the Parsons problems matched the most common student-written solutions; this is denoted by the equivalent symbol (). Problem one (has22), which we changed based on our previous study to represent the most common student-written solution, remained the most common. OverCode also confirmed that all of the Parsons problem solutions we presented to students matched the most common student-written solutions except for problem two (countInRange). Students who solved the write-code version of problem two (see Figure 1) before solving the equivalent Parsons problem used solutions that were different from the provided Parsons problem solution (see Figure 4). This problem asked students to finish creating a function that returned the number of times a specific number appeared in a list between the start and end indices (see Figure 3). There were several differences between the clusters of student solutions and the provided Parsons problem solution: 1) the student solutions used count += 1 instead of count = count + 1, 2) students tended not to declare a variable to hold the current value at the index, and 3) a large group of students (25), used a slice to get all the values between the start and end indices and then loop through all those values instead of looping through the indices.

4.4.1 RQ1: What are the effects on efficiency of solving adaptive Parsons problems made with the most common or uncommon student-written solution versus writing the equivalent code?. The results supported H1: Students were significantly more efficient at solving Parsons problems that used the most common student-written solution versus solving equivalent write-code problems. The median time to solve each Parsons problem was significantly less than the median time to write the equivalent code for all of the problems and both versions except for problem two of version B (see Figure 4). It took students significantly more time to solve problem two as a Parsons problem before solving it as a write-code problem (see Table 2). This was different from our previous results [34], which implies that the most common student solution may change over time. In addition, an analysis of the solutions using OverCode revealed several differences between the Parsons solution and the common student solutions. This result supports the inverse hypothesis: Students were significantly less efficient at solving a Parsons problem with an uncommon solution than solving the equivalent write-code problem.

The results also supported H2: Students first presented with a Parsons problem that had an uncommon solution tended to use that solution to solve the equivalent write-code problem. The largest OverCode cluster of solutions for which students solved problem two as an equivalent write-code problem after the Parsons problem showed that these students used the Parsons problem solution to solve the write-code problem (see Figure 5).

Table 2: Task Completion Times for Parsons → Write
Parsons Problem Write-Code Problem Wilcoxon Matched-Pairs Signed-Ranks Test
Problem (Diff.) n Mdn in seconds Mdn in seconds V p-value A
1 has22 (H) 57 50.0 96.0 279.0 p < 0.001*** 0.65
2 countInRange (M) 29 125.0 68.0 325.5 p = 0.020* 0.33
3 diffMaxMin (E) 59 11.0 37.0 87.5 p < 0.001*** 0.65
4 dictTotal (M) 30 24.0 30.0 89.5 p = 0.006** 0.69
5 dictNames (H) 50 82.0 186.0 174.5 p < 0.001*** 0.68
Notes: E = Easy, M = Medium, H = Hard; The equivalent symbol ≡ indicates that students who solved the adaptive Parsons problem first used the same solution to solve the equivalent write-code problem; * p <.05, ** p <.01, *** p <.001; A = probability-based effect size measure (nonparametric generalization of common language effect size statistic).
Table 3: Task Completion Times for Write → Parsons
Parsons Problem Write-Code Problem Wilcoxon Matched-Pairs Signed-Ranks Test
Problem (Diff.) n Mdn in seconds Mdn in seconds V p-value A
1 has22 (H) 30 39.5 205.0 5.0 p < 0.001*** 0.77
2 countInRange (M) 61 89.0 123.0 501.5 p = 0.002** 0.65
3 diffMaxMin (E) 30 10.0 128.5 0 p < 0.001*** 0.84
4 dictTotal (M) 62 25.0 56.5 163.0 p < 0.001*** 0.66
5 dictNames (H) 26 54.5 388.0 14.0 p < 0.001*** 0.82
Notes: E = Easy, M = Medium, H = Hard; The equivalent symbol ≡ indicates that students who solved the write the code problem first used the same solution as the adaptive Parsons problem; * p <.05, ** p <.01, *** p <.001; A = probability-based effect size measure (nonparametric generalization of common language effect size statistic).

This research implies that Parsons problems should be generated from the most common student-written code to be more efficient. We plan to mine the huge amount of student-written code from free and interactive eBooks on the Runestone eBook platform to automatically generate Parsons problems by using OverCode to determine the most common student solution to write-code problems. This research also provides evidence that students recall and use uncommon Parsons problem solutions to later solve equivalent write-code problems.

4.4.2 RQ2: What is the effect on self-reported cognitive load ratings of solving adaptive Parsons problems versus solving equivalent write-code problems?. The results are shown in Table 4 and Table 5. Students reported investing significantly less mental effort in solving problem one as a Parsons problem than the equivalent write-code problem. This was the problem for which we changed the solution from our previous study. Even though insignificant, students invested more mental effort in solving a Parsons problem with an uncommon solution (problem two) than the equivalent write-code problem when they solved the Parsons problem first. But when they solved the write-code version of problem two first, they reported investing lower mental effort in solving the equivalent Parsons problem even though the solution was uncommon. Solving a Parsons problem with an uncommon solution before solving an equivalent write-code problem resulted in slightly lower self-reported cognitive load ratings for solving the write-code problem. Students also reported investing significantly less mental effort in solving problem three—the easiest problem—as a Parsons problem regardless of the order in which they completed it.

Table 4: Cognitive Load Ratings for Parsons → Write
Parsons Problem Write-code Problem Paired t test
Problem (Diff.) M (SD) of ratings M (SD) of ratings t value df p-value Cohen's drm A
1 has22 (H) 2.60 (1.73) 3.28 (2.19) -2.5926 56 p = 0.012* 0.34 0.60
2 countInRange (M) 3.86 (1.71) 3.34 (1.99) 1.4648 28 p = 0.154 -0.27 0.42
3 diffMaxMin (E) 1.17 (1.52) 2.42 (1.83) -5.3916 58 p < 0.001*** 0.73 0.70
4 dictTotal (M) 1.93 (1.39) 2.43 (1.93) -1.4936 29 p = 0.146 0.28 0.58
5 dictNames (H) 3.42 (1.72) 3.34 (2.36) 0.20216 49 p = 0.841 -0.04 0.49
Notes: E = Easy, M = Medium, H = Hard; * p <.05, ** p <.01, *** p <.001, paired t-test; Likert scale: 1 = Very, very low mental effort; 1 = Very low mental effort; 3 = Low mental effort; 4 = Rather low mental effort, 5 = Neither low nor high mental effort; 6 = Rather high mental effort; 7 = High mental effort; 8 = Very high mental effort, 9 = Very, very high mental effort
Table 5: Cognitive Load Ratings for Write → Parsons
Parsons Problem Write-code Problem Paired t test
Problem (Diff.) M (SD) of ratings M (SD) of ratings t value df p-value Cohen's drm A
1 has22 (H) 2.57 (1.74) 3.30 (2.28) -1.8422 29 p = 0.076 0.35 0.60
2 countInRange (M) 3.11 (2.03) 3.39 (2.24) -1.2159 60 p = 0.229 0.13 0.54
3 diffMaxMin (E) 1.00 (1.17) 2.77 (1.85) -5.7071 29 p < 0.001*** 1.07 0.79
4 dictTotal (M) 2.15 (1.64) 2.56 (1.90) -1.7266 61 p = 0.089 0.23 0.57
5 dictNames (H) 3.04 (1.80) 3.00 (2.90) 0.058921 25 p = 0.954 -0.02 0.50
Notes: E = Easy, M = Medium, H = Hard; * p <.05, ** p <.01, *** p <.001, paired t-test; Likert scale: 1 = Very, very low mental effort; 1 = Very low mental effort; 3 = Low mental effort; 4 = Rather low mental effort, 5 = Neither low nor high mental effort; 6 = Rather high mental effort; 7 = High mental effort; 8 = Very high mental effort, 9 = Very, very high mental effort


text:
# Power a Matrix (Without calculating)

So, I'm reading a linear algebra book (Fraleigh's - self learning) and one of the exercises about Matrix product is to power the matrix:

$$\left( \begin{matrix} 0 & 1\\ -1 & 1 \end{matrix} \right)$$

to the 2001st power. But can't see how without calculating. Any tip?

I have the "feeling" that given that 1 only changes on its sig then its the same the power of 3 that the power of 2001 but I'm not sure. I'm correct?

-
Have you tried to calculate the first few powers to see if there's a pattern? – Qiaochu Yuan Aug 26 '11 at 2:53
Well indeed I have the "feeling" that given that 1 only changes on its sig then its the same the power of 3 that the power of 2001 but I'm not sure. I'm correct? – Randolf Rincón Fadul Aug 26 '11 at 2:59
The characteristic polynomial of the matrix is $x(x-1)+1 = x^2-x+1$. That means that $A^2 = A-I$ by Cayley-Hamilton, so $A^3 = A(A-I) = A^2-A = A-I-A= -I$. So $A^{2001} = (A^3)^{667}$, hence... – Arturo Magidin Aug 26 '11 at 3:20

If $A^n=I$ for a matrix $A$ and natural number $n$, then $A^{kn+r}=A^{kn}A^r=(A^n)^kA^r=I^kA^r=A^r$. Thus, $A^l\equiv A^m$ if $l=m\pmod n$. In the present case, $A^6=I$, and thus $A^{2001}=A^3$, since $2001=3\pmod6$.

-

Let $A$ be your matrix. It can be calculated that $A^3=-I$ where $I$ is the identity matrix. Then $A^{2001}=(A^3)^{667}=(-I)^{667}=-I$

-

Actually, it's not harder to compute the $n$th power of any $2$ by $2$ matrix:

Let $a,b,c,d$ be complex numbers and consider the matrix $$A=\begin{pmatrix}a&b\\ c&d\end{pmatrix}.$$ Let $n\ge2$ be an integer.

How to compute $A^n$?

Here is a recipe:

Assume first that the roots $u$ and $v$ of the polynomial $$f:=X^2-(a+d)\,X+ad-bc$$ are distinct. The equation of the secant line to the curve $y=x^n$ through the points $(u,u^n)$ and $(v,v^n)$ is $$y=\frac{u^n-v^n}{u-v}\ \ x-uv\ \ \frac{u^{n-1}-v^{n-1}}{u-v}\quad,$$ and we have $$A^n=\frac{u^n-v^n}{u-v}\ \ A-uv\ \ \frac{u^{n-1}-v^{n-1}}{u-v}\ \ I,$$ where $I$ is the identity matrix.

For all nonnegative integer $k$ put $$s_k:=u^k+u^{k-1}v+u^{k-2}v^2+\cdots+v^k.$$ [In particular $s_0=1$.] As $$s_k=\frac{u^{k+1}-v^{k+1}}{u-v}\quad,$$ we have $$A^n=s_{n-1}\,A-u\,v\,s_{n-2}\,I.$$ This formula still makes sense, and is still true, if $u=v$, in which case it reads $$A^n=n\,u^{n-1}\,A-(n-1)\,u^n\,I.$$

Why does this recipe work?

The key point is the easily checked equality $$A^2-(a+d)\,A+(ad-bc)\,I,\quad(1)$$ which enables us to compute $$g(A):=a_n\,A^n+\cdots+a_2\,A^2+a_1\,A+a_0\,I$$ for all polynomial $$g=a_n\,X^n+\cdots+a_2\,X^2+a_1\,X+a_0\in\mathbb C[X]$$ as follows.

Assume again $u\not=v$, and let $h\in\mathbb C[X]$ be the unique polynomial of degree $\le1$ which agrees with $g$ at $u$ and $v$: $$h=g(u)\ \frac{X-v}{u-v}+g(v)\ \frac{X-u}{v-u}\quad.$$ [In particular, the secant line to $y=g(x)$ through $(u,g(u))$ and $(u,g(u))$ is $y=h(x)$.] Then our polynomial $f$, which can be written as $$f=(X-u)(X-v),$$ divides $g-h$. That is, we have $$g(X)-h(X)=f(X)q(X)$$ for some polynomial $q$. On substituting $A$ for $X$, and remembering that $f(A)=0$ by (1), we get $g(A)=h(A)$, or $$g(A)=g(u)\ \frac{A-vI}{u-v}+g(v)\ \frac{A-uI}{v-u}\quad.$$ If $u=v$ we use the tangent line instead of the secant line: $$h:=g(u)+g'(u)\,(X-u),$$ and we get $$g(A)=g(u)\,I+g'(u)\,(A-u\,I).$$

This is the case of $2$ by $2$ matrices. For arbitrary square matrix, see for instance the last part of this answer.

EDIT. The $n$th power of an $r$ by $r$ diagonalizable matrix $A$ is given by the beautiful Lagrange Interpolation Formula: $$A^n=\sum_{i=1}^k\ u_i^n\ \prod_{j\not=i}\ \frac{A-u_j\,I}{u_i-u_j}\quad,$$ where the $u_i$ are the distinct eigenvalues.

Here the justification (which is essentially the same as above). The polynomial $$f:=(X-u_1)\cdots(X-u_k)$$ satisfies $f(A)=0$. Note that $$g:=\sum_{i=1}^k\ u_i^n\ \prod_{j\not=i}\ \frac{X-u_j}{u_i-u_j}$$ is the unique polynomial of degree less than $k$ which agrees with $X^n$ on all the $u_i$. Hence, $X^n-g$ is divisible by $f$, and this implies, as above, $A^n=g(A)$.

-
Wouldn't it be easier just to diagonalize the matrix and be done with it? – Christian Mann Aug 26 '11 at 6:40
@Christian: That's the simplest way I know to compute the $n$th power of $$\begin{pmatrix}a&b\\ c&d\end{pmatrix}$$ for arbitrary $n,a,b,c,d$. If you know a simpler one, I'd be very interested to see it. – Pierre-Yves Gaillard Aug 26 '11 at 6:57


text:
# Padua-type pointset for functions singular on line $x=y$

The Padua points $\mathrm{Pad}_{n} \subset [-1,1]^{2}$ are a unisolvent pointset with optimal growth of Lebesgue constant, described in detail here. With some work they can be used to generate a multivariate Chebyshev series representation of the function they attempt to interpolate.

I would like to use the Padua points to generate a multivariate Chebyshev series of a function singular along the line $x=y$, but this is impossible because two of the Padua points are consecutive vertices of the square.

Is there a way to generate a multivariate Chebyshev polynomial interpolant of a function $f\colon [-1,1]^2\to \mathbb{R}$ which is singular on the line $x=y$, perhaps using a modification of the Padua points?

Update: The goal is to write a piece of code which projects as many 2D functions defined on rectangular regions as possible onto Chebyshev polynomials and allow for interpolation and recovery of the coefficients for perhaps other uses. This is similar to the goals of chebfun in 2D.

• Is not a bit odd trying to interpolate a function with a discontinuity? – nicoguaro Mar 30 '18 at 17:01
• @nicoguaro: Gaussian quadrature of integrands with singular endpoints is the same thing-interpolating with a polynomial. Delta sequence approximations to Green's functions act in a similar way. It is delicate, and requires adaptivity, but it can be done. (Whether, in my case, it will actually work, is another question.) – user14717 Mar 31 '18 at 1:50
• Gaussian quadrature for functions with singularities is commonly done using orthogonal polynomials with respect to some weight function. – nicoguaro Mar 31 '18 at 2:00
• That works better, but it cannot be totally black boxed. – user14717 Mar 31 '18 at 2:02
• Gaussian quadrature of functions with singular endpoints still works, depending on the strength of the singularity. – user14717 Mar 31 '18 at 2:03