text:
GMAT Question of the Day - Daily to your Mailbox; hard ones only

 It is currently 15 Dec 2018, 20:53

### GMAT Club Daily Prep

#### Thank you for using the timer - this advanced tool can estimate your performance and suggest more practice questions. We have subscribed you to Daily Prep Questions via email.

Customized
for You

we will pick new questions that match your level based on your Timer History

Track

every week, we’ll send you an estimated GMAT score based on your performance

Practice
Pays

we will pick new questions that match your level based on your Timer History

## Events & Promotions

###### Events & Promotions in December
PrevNext
SuMoTuWeThFrSa
2526272829301
2345678
9101112131415
16171819202122
23242526272829
303112345
Open Detailed Calendar
• ### $450 Tuition Credit & Official CAT Packs FREE December 15, 2018 December 15, 2018 10:00 PM PST 11:00 PM PST Get the complete Official GMAT Exam Pack collection worth$100 with the 3 Month Pack ($299) • ### FREE Quant Workshop by e-GMAT! December 16, 2018 December 16, 2018 07:00 AM PST 09:00 AM PST Get personalized insights on how to achieve your Target Quant Score. # At a dinner party, 5 people are to be seated around a circular table.  new topic post reply Question banks Downloads My Bookmarks Reviews Important topics Author Message TAGS: ### Hide Tags VP Joined: 22 Nov 2007 Posts: 1044 At a dinner party, 5 people are to be seated around a circular table. [#permalink] ### Show Tags Updated on: 01 Nov 2018, 01:59 5 22 00:00 Difficulty: 5% (low) Question Stats: 72% (00:23) correct 28% (00:34) wrong based on 518 sessions ### HideShow timer Statistics At a dinner party, 5 people are to be seated around a circular table. 2 seating arrangements are considered different only when the positions of the people are different relative to each other. what is the total number of different possible seating arrangements for the group? A. 5 B. 10 C. 24 D. 32 E. 120 Originally posted by marcodonzelli on 26 Dec 2007, 07:16. Last edited by Bunuel on 01 Nov 2018, 01:59, edited 2 times in total. Renamed the topic and edited the question. ##### Most Helpful Expert Reply Math Expert Joined: 02 Sep 2009 Posts: 51218 At a dinner party, 5 people are to be seated around a circular table. [#permalink] ### Show Tags 24 Mar 2013, 01:21 3 7 Val1986 wrote: At a dinner party 5 people are to be seated around a circular table. Two sitting arrangements are considered different only when the positions of the people are different relative to each other.What is the total number of possible sitting arrangements or the group? A. 5 B. 10 C. 24 D. 32 E. 120 We have a case of circular arrangement. The number of arrangements of n distinct objects in a row is given by $$n!$$. The number of arrangements of n distinct objects in a circle is given by $$(n-1)!$$. From Gmat Club Math Book (combinatorics chapter): "The difference between placement in a row and that in a circle is following: if we shift all object by one position, we will get different arrangement in a row but the same relative arrangement in a circle. So, for the number of circular arrangements of n objects we have: $$R = \frac{n!}{n} = (n-1)!$$" $$(n-1)!=(5-1)!=24$$ Answer: C. Questions about this concept to practice: http://gmatclub.com/forum/seven-men-and ... 92402.html http://gmatclub.com/forum/a-group-of-fo ... 88604.html http://gmatclub.com/forum/the-number-of ... 94915.html http://gmatclub.com/forum/in-how-many-d ... 02187.html http://gmatclub.com/forum/4-couples-are ... 31048.html http://gmatclub.com/forum/at-a-party-5- ... 04101.html http://gmatclub.com/forum/seven-family- ... 02184.html http://gmatclub.com/forum/seven-men-and ... 11473.html http://gmatclub.com/forum/a-group-of-8- ... 06928.html http://gmatclub.com/forum/seven-men-and ... 98185.html http://gmatclub.com/forum/a-group-of-8- ... 06928.html http://gmatclub.com/forum/find-the-numb ... 06919.html Hope it helps. _________________ ##### Most Helpful Community Reply Intern Joined: 27 Dec 2007 Posts: 48 Re: At a dinner party, 5 people are to be seated around a circular table. [#permalink] ### Show Tags 07 Jan 2008, 01:24 25 11 sort cut for any circular seating arrangements: (n-1)! =(5-1)! = 4! = 4*3*2*1 = 24 ##### General Discussion CEO Joined: 17 Nov 2007 Posts: 3440 Concentration: Entrepreneurship, Other Schools: Chicago (Booth) - Class of 2011 GMAT 1: 750 Q50 V40 Re: At a dinner party, 5 people are to be seated around a circular table. [#permalink] ### Show Tags 26 Dec 2007, 07:33 2 2 C let 1,2,3,4,5 are people. 1. we fix position of 1 2. we have 4*3=12 possible positions for left and right neighbors of 1. 3. for each position of x1y we have 2 possible positions for last two people: ax1yb and bx1ya. Therefore, N=12*2=24 VP Joined: 22 Nov 2007 Posts: 1044 Re: At a dinner party, 5 people are to be seated around a circular table. [#permalink] ### Show Tags 26 Dec 2007, 09:49 1 OA is C, good...anyway, provided I am quite bad at combs, would you please explain it to me step by step in a very clear way..i cannot catch your 3 points! CEO Joined: 17 Nov 2007 Posts: 3440 Concentration: Entrepreneurship, Other Schools: Chicago (Booth) - Class of 2011 GMAT 1: 750 Q50 V40 Re: At a dinner party, 5 people are to be seated around a circular table. [#permalink] ### Show Tags 26 Dec 2007, 10:08 6 1 marcodonzelli wrote: OA is C, good...anyway, provided I am quite bad at combs, would you please explain it to me step by step in a very clear way..i cannot catch your 3 points! let 1,2,3,4,5 are people. "_ _ _ _ _" - positions 1. we fix position of 1 "_ _ 1 _ _" 2. we have 4*3=12 possible positions for left and right neighbors of 1. "_ x 1 _ _" x e {2,3,4,5}. 4 variants "_ x 1 y _" y e {(2,3,4,5} - {x}. 3 variants total number of variants is 4*3=12 3. for each position of x1y we have 2 possible positions for last two people: ax1yb and bx1ya. or "a x 1 y _" a e {(2,3,4,5} - {x,y}. 2 variants "a x 1 y b" b e {(2,3,4,5} - {x,y,a}. 1 variants Therefore, N=12*2=24 Manager Joined: 27 Oct 2008 Posts: 177 Re: At a dinner party, 5 people are to be seated around a circular table. [#permalink] ### Show Tags 27 Sep 2009, 10:48 3 1 At a dinner party, 5 people are to be seated around a circular table. 2 seating arrangements are considered different only when the positions of the people are different relative to each other. what is the total number of different possible seating arrangements for the group? A. 5 B. 10 C. 24 D. 32 E. 120 Soln: Since the arrangement is circular and 2 seating arrangements are considered different only when the positions of the people are different relative to each other, we can find the total number of possible seating arrangements, by fixing one person's position and arranging the others. Thus if one person's position is fixed, the others can be arranged in 4! ways. Ans is C. Manager Joined: 10 Sep 2010 Posts: 119 Re: At a dinner party, 5 people are to be seated around a circular table. [#permalink] ### Show Tags 05 Nov 2010, 20:11 Bunuel wrote: mybudgie wrote: At a party, 5 people are to be seated around a circular table; two seating arrangements are considered different only when the positions of the people are different relative to each other. What is the total number of different possible seating arrangements? A 5 B 10 C 24 D 32 E 120 This is the case of circular arrangement. The number of arrangements of n distinct objects in a row is given by $$n!$$. The number of arrangements of n distinct objects in a circle is given by $$(n-1)!$$. From Gmat Club Math Book (combinatorics chapter): "The difference between placement in a row and that in a circle is following: if we shift all object by one position, we will get different arrangement in a row but the same relative arrangement in a circle. So, for the number of circular arrangements of n objects we have: $$R = \frac{n!}{n} = (n-1)!$$" $$(n-1)!=(5-1)!=24$$ Answer: C. Similar question: combinatrics-86547.html?hilit=relative%20around Hope it's clear. I was confused by the wording of the question "only when the positions of the people are different relative to each other". I knew the formula (n-1)!, but I though that the correct answer would require some limited set of the combinations, defined by "only when the positions of the people are different relative to each other". Then if the question did not mentioned this special condition of ""only when the positions of the people are different relative to each other", the answer would be 24x5=120. Right? Math Expert Joined: 02 Sep 2009 Posts: 51218 Re: At a dinner party, 5 people are to be seated around a circular table. [#permalink] ### Show Tags 05 Nov 2010, 20:40 Fijisurf wrote: Bunuel wrote: mybudgie wrote: At a party, 5 people are to be seated around a circular table; two seating arrangements are considered different only when the positions of the people are different relative to each other. What is the total number of different possible seating arrangements? A 5 B 10 C 24 D 32 E 120 This is the case of circular arrangement. The number of arrangements of n distinct objects in a row is given by $$n!$$. The number of arrangements of n distinct objects in a circle is given by $$(n-1)!$$. From Gmat Club Math Book (combinatorics chapter): "The difference between placement in a row and that in a circle is following: if we shift all object by one position, we will get different arrangement in a row but the same relative arrangement in a circle. So, for the number of circular arrangements of n objects we have: $$R = \frac{n!}{n} = (n-1)!$$" $$(n-1)!=(5-1)!=24$$ Answer: C. Similar question: combinatrics-86547.html?hilit=relative%20around Hope it's clear. I was confused by the wording of the question "only when the positions of the people are different relative to each other". I knew the formula (n-1)!, but I though that the correct answer would require some limited set of the combinations, defined by "only when the positions of the people are different relative to each other". Then if the question did not mentioned this special condition of ""only when the positions of the people are different relative to each other", the answer would be 24x5=120. Right? "the positions of the people are different relative to each other" just means different arrangements (around a circular table). The number of arrangements of n distinct objects in a circle is $$(n-1)!=4!=24$$, (120 would be the answer if they were arranged in a row). _________________ Veritas Prep GMAT Instructor Joined: 16 Oct 2010 Posts: 8678 Location: Pune, India Re: At a dinner party, 5 people are to be seated around a circular table. [#permalink] ### Show Tags 06 Nov 2010, 04:08 1 Arranging 3 people (A, B, C) in a row: A B C, A C B, B A C. B C A, C A B, C B A 3! ways Why is arranging 3 people in a circle different? ....A ....O B......C If I am B, A is to my left, C is to my right. Look at this one now: ....C ....O A......B Here also, A is to my left and C is to my right. In a circle, these are considered a single arrangement because relative to each other, people are still sitting in the same position. This is the general rule in circular arrangement. You use the formula n!/n = (n - 1)! because every n arrangements are considered a single arrangement. e.g. if n = 3, the given 3 arrangements are the same: .....A ................ C ............... B .....O ................ O .............. O B........C ........ A ..... B ..... C........ A In each of these, if I am B, I am sitting in the same position relative to others. A is to my left and C is to my right. and these three are the same: .....C ................ A ............... B .....O ................ O .............. O B........A ........ C ..... B ..... A........ C Here, if I am B, C is to my left and A is to my right. Different from the first three. Hence no. of arrangements = 3!/3 = 2 only Here, they have mentioned 'relative to people' only to make it clearer. In a circle, anyway only relative to people arrangements are considered. You might need to use n! in a circle if they mention that each seat in the circular arrangement is numbered and is hence different etc. Then there are just n distinct seats and n people. If nothing of the sorts is mentioned, you always use the (n - 1)! formula for circular arrangement. _________________ Karishma Veritas Prep GMAT Instructor Learn more about how Veritas Prep can help you achieve a great GMAT score by checking out their GMAT Prep Options > Manager Joined: 27 Jan 2013 Posts: 228 GMAT 1: 780 Q49 V51 Re: At a dinner party, 5 people are to be seated around a circular table. [#permalink] ### Show Tags 23 Mar 2013, 21:00 3 4 Hi there, You can treat this as an ordering question except that for a circular arrangement you need to divide by the number of spaces. So in this case: 5!/5=24 If you spin the circle to right, that doesn't count as a new arrangement. Dividing by the number of spaces takes that into consideration. Happy Studies, HG. _________________ "It is a curious property of research activity that after the problem has been solved the solution seems obvious. This is true not only for those who have not previously been acquainted with the problem, but also for those who have worked over it for years." -Dr. Edwin Land GMAT vs GRE Comparison If you found my post useful KUDOS are much appreciated. IMPROVE YOUR READING COMPREHENSION with the ECONOMIST READING COMPREHENSION CHALLENGE: Here is the first set along with some strategies for approaching this work: http://gmatclub.com/forum/the-economist-reading-comprehension-challenge-151479.html Veritas Prep GMAT Instructor Joined: 16 Oct 2010 Posts: 8678 Location: Pune, India Re: At a dinner party, 5 people are to be seated around a circular table. [#permalink] ### Show Tags 24 Mar 2013, 21:01 2 Val1986 wrote: At a dinner party 5 people are to be seated around a circular table. Two sitting arrangements are considered different only when the positions of the people are different relative to each other.What is the total number of possible sitting arrangements or the group? A. 5 B. 10 C. 24 D. 32 E. 120 Check out this post on circular arrangements. It discusses why the number of arrangements is n!/n (which is the same as (n-1)!) in case there are n people sitting around a round table. http://www.veritasprep.com/blog/2011/10 ... angements/ It also discusses the relevance of this statement in the question: "Two sitting arrangements are considered different only when the positions of the people are different relative to each other" _________________ Karishma Veritas Prep GMAT Instructor Learn more about how Veritas Prep can help you achieve a great GMAT score by checking out their GMAT Prep Options > Manager Joined: 15 Aug 2013 Posts: 247 Re: At a dinner party, 5 people are to be seated around a circular table. [#permalink] ### Show Tags 23 Apr 2014, 18:41 VeritasPrepKarishma wrote: Val1986 wrote: At a dinner party 5 people are to be seated around a circular table. Two sitting arrangements are considered different only when the positions of the people are different relative to each other.What is the total number of possible sitting arrangements or the group? A. 5 B. 10 C. 24 D. 32 E. 120 Check out this post on circular arrangements. It discusses why the number of arrangements is n!/n (which is the same as (n-1)!) in case there are n people sitting around a round table. http://www.veritasprep.com/blog/2011/10 ... angements/ It also discusses the relevance of this statement in the question: "Two sitting arrangements are considered different only when the positions of the people are different relative to each other" Hi Karishma, If there were constraints such as A can't be next to B or C, does that mean that we now have 5 seats but since 3 of them are fixed, the solution would be 2!/2? Veritas Prep GMAT Instructor Joined: 16 Oct 2010 Posts: 8678 Location: Pune, India Re: At a dinner party, 5 people are to be seated around a circular table. [#permalink] ### Show Tags 23 Apr 2014, 19:18 1 1 russ9 wrote: Hi Karishma, If there were constraints such as A can't be next to B or C, does that mean that we now have 5 seats but since 3 of them are fixed, the solution would be 2!/2? I am assuming your question is this: 5 people are to be seated around a circular table such that A sits neither next to B nor next to C. How many arrangements are possible? I don't know how you consider "...3 of them are fixed". The way you handle this constraint would be this: There are 5 vacant seats. Make A occupy 1 seat in 1 way (because all seats are same before anybody sits). Now we have 4 unique vacant seats (unique with respect to A) and 4 people. B and C cannot sit next to A so D and E occupy the seats right next to A on either side. This can be done in 2! ways: D A E or E A D B and C occupy the two unique seats away from A. This can be done in 2! ways. Total number of arrangements = 2! * 2! = 4 Check out these posts. First discusses theory of circular arrangements and next two discuss circular arrangements with various constraints: http://www.veritasprep.com/blog/2011/10 ... angements/ http://www.veritasprep.com/blog/2011/10 ... ts-part-i/ http://www.veritasprep.com/blog/2011/11 ... 3-part-ii/ _________________ Karishma Veritas Prep GMAT Instructor Learn more about how Veritas Prep can help you achieve a great GMAT score by checking out their GMAT Prep Options > Intern Joined: 21 Feb 2015 Posts: 10 Re: At a dinner party, 5 people are to be seated around a circular table. [#permalink] ### Show Tags 22 Feb 2015, 09:43 Please provide feedback to see if this makes sense: I approached it thinking, if you have a circle, say, ABCDE there would be 5! ways of arranging, however, the question states that an arrangement is only different if the positions relative to each other are different. So (1/5)th of the time each person in the circle would in the same position relative to another person. Therefore I did (1/5)x5! = 24 I was thinking "symmetry" as well - what are the experts thoughts on this? The formula though is definitely the easier way. EMPOWERgmat Instructor Status: GMAT Assassin/Co-Founder Affiliations: EMPOWERgmat Joined: 19 Dec 2014 Posts: 13095 Location: United States (CA) GMAT 1: 800 Q51 V49 GRE 1: Q170 V170 Re: At a dinner party, 5 people are to be seated around a circular table. [#permalink] ### Show Tags 22 Feb 2015, 14:00 Hi icetray, Your thinking on this question is just fine. Conceptually, since we're dealing with a circular table with 5 chairs (and not a row of chairs), the table could have 5 different "starting chairs." As such the arrangements (going around the table): ABCDE BCDEA CDEAB DEABC EABCD Are all the same arrangement (just 'revolved' around the table). Since we're NOT allowed to count each of those (they're not different arrangements, they're just rotations of the same arrangement), we have to divide the permutation by 5. 5!/5 = 24 This type of 'set-up' is relatively rare on Test Day - there's a pretty good chance that you won't see it at all. If you do though, then your way of handling the "math" is just as viable as the formula that was given. GMAT assassins aren't born, they're made, Rich _________________ 760+: Learn What GMAT Assassins Do to Score at the Highest Levels Contact Rich at: Rich.C@empowergmat.com # Rich Cohen Co-Founder & GMAT Assassin Special Offer: Save$75 + GMAT Club Tests Free
Official GMAT Exam Packs + 70 Pt. Improvement Guarantee
www.empowergmat.com/

*****Select EMPOWERgmat Courses now include ALL 6 Official GMAC CATs!*****

Target Test Prep Representative
Status: Founder & CEO
Affiliations: Target Test Prep
Joined: 14 Oct 2015
Posts: 4295
Location: United States (CA)
Re: At a dinner party, 5 people are to be seated around a circular table.  [#permalink]

### Show Tags

01 Mar 2018, 17:37
1
Val1986 wrote:
At a dinner party 5 people are to be seated around a circular table. Two sitting arrangements are considered different only when the positions of the people are different relative to each other.What is the total number of possible sitting arrangements or the group?

A. 5
B. 10
C. 24
D. 32
E. 120

When determining the number way to arrange a group around a circle, we subtract 1 from the total and set it to a factorial. Thus, the total number of possible sitting arrangements for 5 people around a circular table is 4! = 24.

_________________

Scott Woodbury-Stewart
Founder and CEO

GMAT Quant Self-Study Course
500+ lessons 3000+ practice problems 800+ HD solutions

Intern
Joined: 22 Sep 2016
Posts: 22
Location: India
WE: Programming (Computer Hardware)
Re: At a dinner party, 5 people are to be seated around a circular table.  [#permalink]

### Show Tags

11 Dec 2018, 03:08
Bunuel wrote:
Val1986 wrote:
At a dinner party 5 people are to be seated around a circular table. Two sitting arrangements are considered different only when the positions of the people are different relative to each other.What is the total number of possible sitting arrangements or the group?

A. 5
B. 10
C. 24
D. 32
E. 120

We have a case of circular arrangement.

The number of arrangements of n distinct objects in a row is given by $$n!$$.
The number of arrangements of n distinct objects in a circle is given by $$(n-1)!$$.

From Gmat Club Math Book (combinatorics chapter):
"The difference between placement in a row and that in a circle is following: if we shift all object by one position, we will get different arrangement in a row but the same relative arrangement in a circle. So, for the number of circular arrangements of n objects we have:

$$R = \frac{n!}{n} = (n-1)!$$"

$$(n-1)!=(5-1)!=24$$

http://gmatclub.com/forum/seven-men-and ... 92402.html
http://gmatclub.com/forum/a-group-of-fo ... 88604.html
http://gmatclub.com/forum/the-number-of ... 94915.html
http://gmatclub.com/forum/in-how-many-d ... 02187.html
http://gmatclub.com/forum/4-couples-are ... 31048.html
http://gmatclub.com/forum/at-a-party-5- ... 04101.html
http://gmatclub.com/forum/seven-family- ... 02184.html
http://gmatclub.com/forum/seven-men-and ... 11473.html
http://gmatclub.com/forum/a-group-of-8- ... 06928.html
http://gmatclub.com/forum/seven-men-and ... 98185.html
http://gmatclub.com/forum/a-group-of-8- ... 06928.html
http://gmatclub.com/forum/find-the-numb ... 06919.html
http://gmatclub.com/forum/gmat-club-mon ... 55157.html (700+)

Hope it helps.

Bunuel,

Thanks.
_________________

Best,
Spiritual Yoda

Math Expert
Joined: 02 Sep 2009
Posts: 51218
Re: At a dinner party, 5 people are to be seated around a circular table.  [#permalink]

### Show Tags

11 Dec 2018, 03:10
1
SpiritualYoda wrote:
Bunuel wrote:
Val1986 wrote:
At a dinner party 5 people are to be seated around a circular table. Two sitting arrangements are considered different only when the positions of the people are different relative to each other.What is the total number of possible sitting arrangements or the group?

A. 5
B. 10
C. 24
D. 32
E. 120

We have a case of circular arrangement.

The number of arrangements of n distinct objects in a row is given by $$n!$$.
The number of arrangements of n distinct objects in a circle is given by $$(n-1)!$$.

From Gmat Club Math Book (combinatorics chapter):
"The difference between placement in a row and that in a circle is following: if we shift all object by one position, we will get different arrangement in a row but the same relative arrangement in a circle. So, for the number of circular arrangements of n objects we have:

$$R = \frac{n!}{n} = (n-1)!$$"

$$(n-1)!=(5-1)!=24$$

http://gmatclub.com/forum/seven-men-and ... 92402.html
http://gmatclub.com/forum/a-group-of-fo ... 88604.html
http://gmatclub.com/forum/the-number-of ... 94915.html
http://gmatclub.com/forum/in-how-many-d ... 02187.html
http://gmatclub.com/forum/4-couples-are ... 31048.html
http://gmatclub.com/forum/at-a-party-5- ... 04101.html
http://gmatclub.com/forum/seven-family- ... 02184.html
http://gmatclub.com/forum/seven-men-and ... 11473.html
http://gmatclub.com/forum/a-group-of-8- ... 06928.html
http://gmatclub.com/forum/seven-men-and ... 98185.html
http://gmatclub.com/forum/a-group-of-8- ... 06928.html
http://gmatclub.com/forum/find-the-numb ... 06919.html
http://gmatclub.com/forum/gmat-club-mon ... 55157.html (700+)

Hope it helps.

Bunuel,

Thanks.

Ignore that question. Removed the link.
_________________
Director
Joined: 18 Aug 2017
Posts: 742
Location: India
Concentration: Sustainability, Marketing
WE: Marketing (Energy and Utilities)
Re: At a dinner party, 5 people are to be seated around a circular table.  [#permalink]

### Show Tags

11 Dec 2018, 04:08
marcodonzelli wrote:
At a dinner party, 5 people are to be seated around a circular table. 2 seating arrangements are considered different only when the positions of the people are different relative to each other. what is the total number of different possible seating arrangements for the group?

A. 5
B. 10
C. 24
D. 32
E. 120

for circular arrangement s ( n-1)!

so ( 5-1)! ;4! = 24 IMO C
_________________

If you liked my solution then please give Kudos. Kudos encourage active discussions.

Re: At a dinner party, 5 people are to be seated around a circular table. &nbs [#permalink] 11 Dec 2018, 04:08
Display posts from previous: Sort by


text:
## How does RSA encryption work?

Since we have been discussing quantum computers, one of the main application of them is to break the RSA encryption. But what is this scheme and how does it work? Let's start with how encryption evolved during the history of mankind. In the ancient times one method was to peel in a spiral fashion the bark out of a tree branch and hold onto the stick. With the bark still attached you write the message vertically and after you peel it the message appears garbled up. To decode it you wrap the bark back on the branch and the letters neatly align if you have a branch of the right diameter. This is a rather poor method of hiding the message and better methods were required.

A big improvement in antiquity was the Caesar's cypher in which each letter is substituted by another letter. This method provides a large number of possibilities for encryption, but it has a simple weakness: in any language some words and some letter combinations are very common. For example in the English language the word "the" is the most common, and from it you can easily guess the substitution for the letters T, H, and E. Working in reversed word frequency order you can break this method of encryption relatively easily. The counter method for this was to daily change the substitution method by some sort of algorithm available to both the sender and receiver. One classical example of this was the Enigma machine used by Germany in the second world war.

Now if you do need to change the way the encryption is run after each encrypted message, is there a method which is unbreakable? Indeed it is, and it is based on XOR. In ASCII, each letter is represented by a number and each number has a binary representation of 0 and 1. If you have a one-time use of a cipher key: a sequence of random letters the same length as the message to be sent, you extract the binary representation of the cypher and you do a bit-wise XOR operation between the bits of the text and the bits of the cypher. The operation is reversible and as long as you do not reuse the key to allow the possibility of of the frequency attack explained above, the encryption is unbreakable. So why not use this method all the time and call it a day? Because the management of the keys is horrendous in practice.

The next improvement came from using asymmetric keys. The key idea is that of factorizing a number intro primes. It is trivial to multiply numbers, but there is no good known algorithm to do the factorization. The factorization time of a number made out of the product of two primes is proportional to the square root of the number. Say that we have a 400 digit number. The square root is a 200 digit number. The lifetime of the universe in seconds is an 18 digit number. A computer which factorizes a million tries per second, can only check $$10^{24}$$ possibilities. This means that the computer has to run for $$10^{176}$$ times the lifetime of the universe to factor a 400 digit number!

So what is the RSA algorithm?

Step 1: pick two large prime numbers p and q and multiply them.
Step 2: multiply (p-1) with (q-1) and find out a small number e relative prime with (p-1) * (q-1). pq and e form the public key you broadcast to the world.

Recall that each letter has a corresponding ASCII code and can be represented as a number.

Step3: the sender wants to encode a number M. Using the public key he computes the encryption of M as: $$M^e\ (mod~pq) = C$$ and he sends C to you.
Step 4: you first compute a number d such that $$ed=1 (mod~(p-1)(q-1))$$
Step 5: Finally you compute $$C^d (mod~pq) = M$$

The computations are in general time consuming and the method is used in practice only to encrypt the unbreakable (one-time used) XOR keys.

To break the RSA encryption one needs to be able to factorize the pq product. One way to do it is by Shor's algoritm. In this approach all steps are fast except the key part which is a quantum Fourier transform. In one of the prior posts I discussed a classical embedding of a quantum computer in what amounts to be an analog computer. The speedup in this setting is due to the ability to represent analog signals which are able to fast compute a Fourier transform.

The key question to ask is whether the computational speedup of the computation in a quantum computer is due to quantum mechanics, or is due to the nature of the analog structured being utilized in Shor's algorithm. Supporters of the Many Worlds Interpretation like David Deutsch contend it is quantum mechanics, but my take on it that this assertion is proven false by several concrete realization of analog computational devices.  Besides the emulation device created by Brian R La Cour and Granville E Ott, there are other prototype analog devices using optical waves capable of fast performing the key step in Shor's algorithm. The fathers of this line of research are David Ferry and Harris Akis from Arizona State University who published the first paper on this in 2001: Quantum wave processing in Superlattices and Microstructures - a journal unknown to the quantum foundation community.

format: plain


text:
Resource Usage¶

These settings are useful to prevent IMAP commands from opening too many emails and causing larger system-wide performance problems.

mail_sort_max_read_count = 100

This controls how many slow mail accesses sorting can perform before it fails: a NO [LIMIT] Requested sort would have taken too long The SORT reply is still returned, but it’s likely not correct.

Exception: With obox format SORT (ARRIVAL) will always return OK. When it reaches the limit, it starts getting the received-timestamps from the time the object was saved. This is commonly the same as the received-timestamp, but not always.
protocol !indexer-worker {
mail_vsize_bg_after_count = 100
}

If more than this many mails need to be opened/stat()ed to get their vsize, return failure and finish up the quota recalculation on background. When a quota failure happens during LMTP delivery or IMAP APPEND/COPY, user is assumed to be below quota and the operation will succeed. Only the IMAP GETQUOTA command will return a failure

plugin {
mail_log_cached_only = yes
}

If enabled, everything except save event will log only the fields that can be looked up from cache. This improves performance if some of the fields aren’t cached and it’s not a strict requirement to log them.

import_environment = \$import_environment MALLOC_MMAP_THRESHOLD_=131072

Avoid processes permanently using too much memory by having it use mmap() for >=28 kB memory allocations.


text:
Feeds:
Posts

## PRODUCT RULE FOR CAPUTO FRACTIONAL DERIVATIVES IS THE KEY TO MITTAG-LEFFLER AUTOCORRELATIONS IN VOLATILITY

The Caputo fractional derivative is the convolution of the normal derivative with a fractional kernel:

$D^\mu f(t) = 1/\Gamma(1-\mu) \int_0^t (t-s)^{-\mu} f'(t) ds$

The fact that the derivative is in the integrand allows us to apply the usual product rule to

$D^\mu (x_t x_{t+h}) = 1/\Gamma(1-\mu) \int_0^t (t-s)^{-\mu} x_{s+h}Dx_s + x_s Dx_{s+h} ds$

Now assume $D^\mu x_t = -\lambda x_t + \sigma dw_t/dt$ with a white noise $dw_t/dt$.  Since $E(dw_t/dt) = 0$ we have

$D^\mu E(x_t x_{t_h}) = E( x_{t+h} D^\mu x_t + x_t D^\mu x_{t+h}) + ER$ where the white noise terms all have zero expectation.  Then $D^\mu E(x_t x_{t+h}) = -2\lambda E(x_t x_{t+h}) + ER$.  Assuming the remainder term is small, this produces for the autocorrelation the fractional equation $D^\mu f(t) = -2\lambda f(t)$ approximately therefore the autocorrelation will be a Mittag-Leffler function.  This simple analysis is important because the empirical volatility autocorrelations are well-matched by $(a,b,c) \rightarrow E_{a,b}(-ct^a)$ and the analysis provides us with the steps toward modeling volatility with closer match to empirical data.

Now let us take a look at some of the fits to empirical data to get a sense for why these sorts of models are useful.

## ELEMENTARY COMPUTATION OF AUTCOVARIANCE FOR NONSTOCHASTIC MITTAG-LEFFLER

F. Mainardi (mainardi-2014-approximations-mittag-leffler-function) introduced the following approximation for the Mittag-Leffler function $E_{a}(-t^a)$ when $t \rightarrow 0$

$f(t) = 1/(1+Ct^a)$

with $C=\Gamma(1+a)$.  By Taylor expansion

$f(t+h) \sim f(t) - C a t^{a-1} /(1+Ct^a)^2 h + O(h^2)$

Therefore $f(t)f(t+h) = f(t)^2 ( 1 + f'(t)/f(t) h + O(h^2)$ and

$f(t) f(t+h) = f(t)^2 ( 1 - C a t^{a-1}/(1+ Ct^a) h + O(h^2))$

This is then the behavior of the ‘autocorrelation’ function satisfying $D^a x_t = -x_t$. This elementary example provides some intuition for stochastic models where the autocorrelation function can be fit by Mittag-Leffler functions.

CAPUTO DERIVATIVE

The Caputo derivative is more useful for computations because one can inherit the product rule from the usual derivative and constants are annihilated by it.

$D^\mu f(t) = \frac{1}{\Gamma(1-\mu)} \int_0^t \frac{f'(s)}{(t-s)^\mu} ds$

Suppose $D^\mu x_t = -\lambda x_t$.  Then the product rule inside the integral and integration by parts gives

$D^\mu(x_t x_{t+h}) = - 2 \lambda x_t x_{t+h} - \int_0^t (D^\mu x_s D x_{s+h} + D^\mu x_{s+h} D x_s) ds$

We can now add stochastic components $D^\mu x_t = -\lambda x_t + A dw_t$ with zero expectations and still have

$D^\mu E(x_t x_{t+h} ) = -2 \lambda E(x_t x_{t+h} ) + ER(t,h)$

where $R(t,h) = \int_0^t (D^\mu x_s D x_{s+h} + D^\mu x_{s+h} D x_s) ds$.  Assuming this is small, the Mittag-Leffler function will be a good approximation for the autocorrelation function of $x_t$.

## BOTH FRACTIONAL INTEGRATION AND FRACTIONAL BROWNIAN MOTION SHOULD APPEAR IN THE CORRECT MODEL OF VOLATILITY

By ‘correct’ we mean one that produces autocorrelations that fit empirical autocorrelations, i.e. Mittag-Leffer functions $(a,b,c)\rightarrow E_{a,b}(-ct^a)$.

$D_t^{\mu} x_t = (\alpha - \beta x_t) + \sigma \sqrt{x_t} dw_t /dt$

Apply $D^{1-\mu}$ to obtain

$D^1_t x_t = D^{1-\mu} (\alpha - \beta x_t) + \sigma D_t^{1-\mu}(\sqrt{x_t} dw_t/dt)$ (*)

Integrate the second quantity by parts using the fact that $D_t^\alpha = 1/\Gamma(1-\alpha) d/dt \int_0^t (t-s)^{-\alpha} (\cdot) ds$ to get

$C(\alpha) (\sqrt{x_t} - \sqrt{x_0}) dw^{1-\mu}_t/dt - 1/2 \Gamma(-\mu) \sqrt{x_t} dw^{1-\mu}_t/dt$

This then still leaves the fractional integration in the first term of (*).  So this is partly the problem with using fractional Brownian motions only in the model $dX_t = (\alpha-\beta X_t) dt + \sigma \sqrt{X_t} dw^{1-\mu}_t$ it would seem.

## THE PROBLEM OF AUTOCORRELATION OF A FRACTIONAL SQUARE ROOT PROCESS

$D^\mu x_t = -k x_t + \gamma \sqrt{x_t + \theta} dw_t/dt$ (*)

where the second term is a white noise whose expectation is zero

$D_t E(x_{t+h} x_t) = -k E( x_t D^{1-\mu} x_{t+h} + x_{t+h} D^{1-\mu} x_t)$

using $D^1_t x_t = D^\mu_t D^{1-\mu}_t$.   So we get

$D^\mu_t E(x_{t+h} x_t) = -k E( I^{1-\mu} (x_t D_t^{1-\mu} x_{t+h} + x_{t+h}D_t^{1-\mu} x_t) )$ (**)

Now use the formula

$D_t^{1-\mu} (uv) = \sum_{k=0}^\infty Choose(\mu,k) D^{1-\mu-k}_t u D^k_t v$

to see that the right hand side of (**) is

$-k E( x_t x_{t+h} + x_t D^{1-\mu}_t x_{t+h} - \sum_{k=1}^\infty Choose(\mu,k) D^{1-\mu}_t x_t D^k x_{t+h})$

So if second term and the infinite sum have sufficient cancellation, we have

$D^\mu E(x_t x_{t+h}) = -k E( x_t x_{t+h} )$

and then we have the Mittag-Leffler function as the autocorrelation of these fractional square root processes (this is important because we can see that they do match data quite well.)

A direct integration by parts using (*) shows

$D^\mu E(x_t x_{t+h}) = - k E(x_t x_{t+h}) - \int_0^t k^2 E(x_s x_{s+h}) + \gamma^2 \sqrt{(x_s+\theta)(x_{s+h} + \theta)} D^{1-\mu} x_{s+h} ds$

Assuming $0 \le D^{1-\mu} x_{s+h}$ we have the inequality

$D^\mu E(x_t x_{t_h}) + k E(x_t x_{t+h}) \ge 0$ (***)

since the integral is positive.  Consider $g(t), f(t)$ satisfying $f(0) = g(0) = E(x_{0}x_{0+h})$ and

$D^\mu g(t) + k g(t) = 0$(****)

and let $f(t) = E(x_tx_{t+h})$.  Then subtracting (****) from (***) tells us that $D^\mu (f-g)(0) \ge 0$ to which we can apply $D^{1-\mu}$ to ensure that $f(t) \ge g(t)$.  Therefore we have:

The covariance of the process (*) majorizes a Mittag-Leffler function with parameters $E_{\mu}( -kt^\mu )$.  This result is a partial answer to the question for volatility processes since the Mittag-Leffler function has, when $\mu < 1$ slower than exponential decay and therefore the model provides ‘at least long memory’.

## THE RESOLUTION OF PROBLEM OF LONG MEMORY IN VOLATILITY

The problem of long memory in finance has been on the agenda of top econometricians like Clive Granger since the 1960s.  In fact, he wrote about the typical spectral shape of economic variables in 1966 and then in 1980-81 introduced the long memory models that I have been using to show that long memory is a real phenomenon probably for the n-th time since the 1960s, the fractionally differenced ARIMA models, for which a nice open source implementation in the ‘forecast’ module in R makes this simple.  Well, so Granger and coworkers were responsible for the Ding-Granger-Engle model from 1993 which fit 1900 stock volatility autocorrelations extremely well, which I was trying to understand for the last few days.  The DGE autocorrelation model is:

$\rho_t = a \rho_{t-1}^{b_1} b_2^t t^{b_3}$

which is log-linear and can be fit with $R^2 \sim 0.98-9$ so its very good.  Attempting to analyze this equation directly produces a complicated mess.  But we are fortunate because the fundamental idea behind this model is essentially to interpolate between an exponential and a power law decay, so the question is whether a similar quality fit to actual empirical volatility autocorrelations in stocks can be obtained by a more theoretically justified model, and the answer is yes.  We can consider the model $(a,b,c) \rightarrow E_{a,b}(-ct^a)$ and obtain fits with $R^2 \sim 0.97-9$.  For now here are some pictures of fits.

The natural model to consider for these, following the breakthrough of Comte-Renault in 2003 of an analyzable stochastic volatility model with long memory, where they took a square root process $dX_t = k(\theta - X_t) dt + \sqrt{X_t} dw_t$ as used by Cox-Ingersoll-Ross in 1985 and studied by Feller in 1951 and essentially considered the volatility to be a fractional integral of $X_t$.  This allowed them to use the Heston 1993-type analysis for closed form solutions in the affine class which are solvable — essentially this allows one to take a complicated second order PDE which comes out of Black-Scholes analysis via Ito formula and solve it by ordinary differential equations; the affine class is essentially a generalized view for when this is possible.  Regardless of analytic tractability, there is still no science without some exact numerial model fitting data, and the fits above tell us what the process should be if we did not worry about option pricing: we’d be looking at a fractional version of the square root type process:

$(d/dt)^\mu x_t = k(\theta - x_t) + \sqrt(x_t) dw_t/dt$

which is the non-rigorous way of adding a white noise scaled by $\sqrt(x_t)$ to a fractional ordinary differential equation.  The Mittag-Leffler functions act as analogs of exponentials and describe the autocorrelations of these processes just as exponentials occur as the autocorrelations of the standard square root process.  See samorodnitsky-spectrum-autocorrelation for introduction to long memory and comte-renault-2003-affine-sv

## SHORT MEMORY REASONABLE FOR 3-MONTH CONSTANT MATURITY

Long memory for equities is universal but here is a quick exercise to check the spectral density of 3-month constant maturity Treasuries and see that a short memory model does fine.  The data can be obtained here.  cm-rates3m The R code is:

z<-as.numeric(as.character(y[,2]))
z[is.na(z)]<-0
k<-kernel(“daniell”,2)
v<-log(z^2+1e-6)
s<-spec.pgram(v,k,taper=0,log=”no”)
temp<-data.frame(x=s$freq,y=s$spec)
mod<-nls( y ~ exp(a+b*x),data=temp,start=list(a=0,b=0))
plot(temp$x,temp$y,pch=’x’)
lines(temp$x,predict(mod,list(x=temp$x)))

Then you can take a look at the decay of the fit directly by estimated parameter $b=-3987$.

## COMTE-RENAULT LONG-MEMORY SQUARE ROOT PROCESS

The standard square root process introduced by Feller (1951), used by Cox-Ingersoll-Ross (1985) and used for modeling stochastic volatility by Heston (1993) is the following

$d\tilde{\sigma}^2(t) = k(a-\tilde{\sigma}^2(t)) dt + \gamma \sqrt{\tilde{\sigma}^2} dw(t)$

The Comte-Renault long-memory square root process comes out of two steps.  First, they consider

$dX(t) = -kX(t)dt + \sqrt{X(t) + \tilde{\theta}}dw(t)$ which is equivalent to $\tilde{\sigma}^2(t) = X(t) + \tilde{\theta}$.  Then they consider the long memory process as

$\tilde{\sigma}^2(t) = | \tilde{\theta} + I^{(\alpha)} X(t) |$ where $I^{(\alpha)}$ is the fractional integration operator.  The variance and autocorrelations of $\sigma^(2)$ they relate to the variance and autocorrelations of the square root process $X(t)$ as follows.

(a)  $Var(X(t)) = Var(\tilde{\sigma}^2(t)) = \frac{\tilde{\theta}\gamma^2}{k}$ and

$Var(\sigma^2(t)) = \frac{\theta\gamma^2}{k^{2\alpha+1}} \frac{\Gamma(1-2\alpha)\Gamma(2\alpha)}{\Gamma(1-\ alpha)\Gamma(\alpha)}$

(b) The autocorrelations are $c_X(h) = \frac{\tilde{\theta}\gamma^2}{2k} e^{-k|h|}$ and

$c_{\sigma^2}(h)/c_{\sigma^2}(0) = 1 - \frac{(kh)^{2\alpha+1}}{2\alpha(2\alpha+1)\Gamma(2\alpha)} + O(h^2)$ for small $h$ and

$c_{\sigma^2}(h)/c_{\sigma^2}(0) = (kh)^{2\alpha-1}/\Gamma(2\alpha)$ for large $h$.

(c)  The spectral density of $\sigma^2(t)$ is

$f_{\sigma^2}(\lambda) = \frac{\tilde{\theta} \gamma^2}{\lambda^{2\alpha}(\lambda^2 + k^2)}$


text:
# Talk:Installing Lazarus on MacOS X

This is a draft of a new "top half" for the main page. Its about getting a recent version of lazarus going on a recent version of OSX. I need to get a lot of formatting done and a polite way to tuck the historical data down the bottom. Note there is absolutely nothing new from me here, its all stuff scattered across the forum and wiki. I'll be back ....

David

Installing Lazarus on a Mac is not particularly difficult but is a bit tedious. Its critical that you do the install in the correct order. Skipping steps will almost certainly lead to tears. In brief, here is what you do -

2. Install the global command line tools for Xcode.
3. Install gdb - sort of but not really optional.
4. Install Free Pascal Compiler, FPC Source and Lazarus
5. Speak to Lazarus about gdb.

The detailed instructions assume a recent version of OSX on you Mac, a recent version of Xcode from Apple and recent version of Lazarus. Further down the page, under Legacy Documentation, you will see older information that may be relevant if you are using older components. You can assist by replacing out of date info, either deleting it, or, if it may help someone working with a legacy project, moving it to bottom of the page.

In general, this is about using the Carbon Widget Set, it is intentionally (by Apple) limited to 32 bits and we have every reason to believe Apple may drop support for it some time in the not too distant future. The alternative is Cocoa, more information to be provided.

mv Downloads/Xcode-beta.app /Developer/.
sudo xcode-select -s /Developer/Xcode-beta.app/Contents/Developer

#### Step 2. Xcode Command Line Tools

This is shown here as a separate step because it is a separate step in addition to Step 1. Don't confuse this with the internal Xcode command line tools that the Xcode GUI will tell you are already installed. Lazarus cannot use those Xcode internal command line tools, so do the following (its quick and easy)-

Xcode-select —install

#### Step 3 install gdb

While this is really optional, I suggest you do need gdb in most cases and I recommend this step. Alternatives include -

Getting gdb to run can be a bit tedious but is worthwhile in the end. I recommend this approach

1. Install brew and use brew to install gdb- http://wiki.freepascal.org/GDB_on_OS_X_Mavericks_and_Xcode_5
2. Self sign the gdb binary using tools already on your Mac - https://sourceware.org/gdb/wiki/BuildingOnDarwin This is the tedious part. The instructions are clear except, perhaps they could have mentioned that after you have set the Keychain to ’System’ you need click ‘Create’ and ‘Done’ on the next screen. Then go and find the cert in your overall list of certs to do the next instruction “using the contextual menu…”. Don’t worry about step “2.1.4 Disable starting the debuggee…”, we’ll address that once Lazarus itself is installed and working.
3. Once Lazarus is installed and fired up, tell it how it should start gdb, that is step 5.

#### Step 4 FPC, FPC Source and Lazarus

Get and install, in this order, the FPC, FPC Source, Lazarus. I used Lazarus 1.8rc4, its very mature and probably about to become 1.8 pretty soon. Get all three from Link https://sourceforge.net/projects/lazarus/files . As these install kits are not approved by Apple, you need to hold down the Control key, click the package and choose Open and confirm you want to install from an Unknown Developer (i.e. one who does not pay Apple a kickback).

#### Step 5 Tell Lazarus about starting gdb

OK, now you should be able to start Lazarus, it should display the various parts and paths it needs (including gdb) in the little opening screen. You will get an alert there if you chose to not use a debugger. Proceed to the IDE and we now need to tell Lazarus to tell gdb to not open a shell, as noted by a number of Forum people (http://forum.lazarus.freepascal.org/index.php/topic,37310.0.html). Within Lazarus, click Tools->Options->Debugger->General In the “Debugger specific Options” there is a field labeled Debugger_Startup_Options. Type in "--eval-command=set startup-with-shell off" (including the inverted commas) AND press the return key, click OK. Note you cannot copy and paste into this box (##\$!). See screen shot.

Now, try the Run test ! The first time in a debugging session, expect a warning and then a logon box where you need put in your password as the debugger starts up. Annoying but its all fine after that.


text:
# Automated FTP from Dropbox with Hazel

Macstories.net linked to QuickShot 2.0. It's an iOS app that can send photos directly to Dropbox. But I was thinking, I would prefer an app that could quickly send images to my FTP server at Macdrifter.com. So I came up with a little Hazel rule to connect Dropbox and my FTP server.

### Design Considerations

I want to put these files on my FTP server so that I can use them for posts to this site. That means I need an easy way to get the URL of the image. I previously built an email rule that uploaded the file and returned the link to me in a reply email. That worked really well, but email is not where I write my posts. I wanted the URL somewhere convenient. So I decided to have the resulting links added to a URL log file in my Dropbox Notes folder. NVAlt, WriteRoom and Nebulous Notes all point to my Notes folder.

I knew I would use FTP. I really like Transmit for FTP, but it seemed a little heavy handed for Hazel automation. I decided I needed to use straight Python for the FTP and skip the application scripting.

The Hazel rule is simple. It just looks for a new file it has never matched before. All of the work is done by a Python script.

Note that the Shell path is actually invoking Python.

### The Script

I learned something new with this Python script, which is generally my goal. I learned about using the Paramiko module for SFTP. Paramiko is primarily a Python module for SSH that also includes some convenient methods for SFTP. I'm not sure if it passes the Drang sniff test but I like it.

To install Paramiko, just use pip:

:::bash
sudo pip install paramiko

It should also install the pycrypto dependency.

Here's the entire Python script.

:::python
import paramiko
from datetime import date
import os
import sys
import urllib

try:
# This is how Hazel gets the incoming file path
localPath = sys.argv[1]

# Location to write the URL links

# Base File Location on the FTP Host to upload the file
fileName = os.path.basename(localPath)

# Just logging paramiko incase of issues
paramiko.util.log_to_file('/tmp/paramiko.log')
host = "my_host_name"
port = 22

# This will be the base URL path for the file link
transport = paramiko.Transport((host, port))

# Determine the current month and year to create the upload path
today = date.today()
datePath = today.strftime("%Y/%m/")

# Used to create full remote file path
remoteFilePath =  remotePath + datePath + fileName
sftp = paramiko.SFTPClient.from_transport(transport)

# Do the deed. Use the SFTP put command
sftp.put(localPath, remoteFilePath)
sftp.close()
transport.close()

#Open the URL log file for appending
logfile = open(logFilePath, "a")

try:
# %% encode the file name and append the URL to the log file
logfile.write(url_Base+datePath+urllib.quote(fileName)+'\n')

finally:
logfile.close()

except IOError:
pass

Obviously, you will need to provide your own connection details and file paths. This script is specific to my needs.

### The Workflow

There are two ways I am using this. The first is on my Mac. Any file I drag to this Dropbox FTP folder gets uploaded and a link added my link log. It's amazingly convenient.

The second is on iOS. The QuickShot app is cool. I configured it to upload to this Dropbox FTP folder. The file is uploaded to the server and a link silently added to my log file. I can upload any file from an application that supports Dropbox uploads. But QuickShot is pretty convenient.

I'll also add that it is convenient to have a Dropbox folder filled with the images I have uploaded to my server. It provides a history for me to see what I was thinking while adding screen shots. I take a heck of a lot of screen shots.

There are a lot of modules imported for this script. sys is needed just to handle the connection with Hazel. os is needed just for getting the file name and writing the log file. Heck, I even import the urllib module just to encode the file name. But you know what? It works and it is fast, so I don't care. CPU cycles are cheap. Isn't that the point of these scripting languages?

It's never a great idea to hard code login credentials. I might change this in the future to use a config file, but I'm not too concerned with the kind of stuff I use this for.

The error handling in the script is pretty lean. Other than the try and except blocks there is none. I should add more. I probably will not.

The FTP put command will overwrite any file with the same name in the same location. That's by design. If I want to edit a file on my Mac, I can just open it in Acorn or optimize it with ImageOptim and Hazel will reprocess it when I save. The new version is uploaded but the URL link remains the same.

This will work with any file type. That's cool but a bit scary. If I accidentally drop-in something private, then it will be uploaded to my public FTP host automatically. I'm aware of the potential problems. I'm a big boy. I can handle it.

### Future Plans

I'd like to add some automatic image processing. I definitely want to include ImageOptim processing but I would also like to resize any image larger than 650px. It would save a lot of trouble with iPad images. I might need some different rules to provide multiple options for image resolution.

I'm thinking about adding the links to my pasteboard on my Mac. That way I would have the log file and also a running list in my pasteboard.


text:
# In a furniture shop , 24 tables were bought at the rate of Rs. 450 per table . The shopkeeper sold 16 of them at the rate of Rs. 600 per table and the remaining at the rate of Rs. 400 per table . Find his gain or loss.

###### Question:

In a furniture shop , 24 tables were bought at the rate of Rs. 450 per table . The shopkeeper sold 16 of them at the rate of Rs. 600 per table and the remaining at the rate of Rs. 400 per table . Find his gain or loss.

### A marble rolling at a speed of 2 meters per second falls off the end of a 1-meter high table. How long will the marble be in the air? a. What do you know? b. What do you need to solve for? c. What equation(s) will you use? d. What is the solution to this problem?

A marble rolling at a speed of 2 meters per second falls off the end of a 1-meter high table. How long will the marble be in the air? a. What do you know? b. What do you need to solve for? c. What equation(s) will you use? d. What is the solution to this problem?...

### In Florida between 2001 and 2005 an average of how many lives were lost every year due to excessive alcohol use

In Florida between 2001 and 2005 an average of how many lives were lost every year due to excessive alcohol use...

### Consumer behavior refers to Group of answer choices A. the aspects of a consumer's decision making processes that cannot be measured. B. the actions a person takes in purchasing and using products and services, including the mental and social processes that come before and after these actions C. the five stages a buyer passes through in making choices about which product and service to investigate, purchase, and consume. D. the mental and social processes related to purchasing that are innate

Consumer behavior refers to Group of answer choices A. the aspects of a consumer's decision making processes that cannot be measured. B. the actions a person takes in purchasing and using products and services, including the mental and social processes that come before and after these actions C. th...

### Byzantine artist were more likely to work with?

byzantine artist were more likely to work with?...

### Explain how to divide an amount by 2. Use the terms dividend, divisor and quotient

Explain how to divide an amount by 2. Use the terms dividend, divisor and quotient...

### How does temperature change the density of water? Question 3 options: Temperature does not affect density Cold temperatures lower density Cold temperature increase density Warm water increases density

How does temperature change the density of water? Question 3 options: Temperature does not affect density Cold temperatures lower density Cold temperature increase density Warm water increases density...

### Can you propose an amendment in florida to be voted on?

can you propose an amendment in florida to be voted on?...

### Which of the following early North American cultures were known for building wigwams and longhouses?

Which of the following early North American cultures were known for building wigwams and longhouses?...

### PLZZZ help!!Which theorem would show that the two right triangles are congruent?A. SAS Triangle Congruence TheoremB. HL Triangle Congruence TheoremC. ASA Triangle Congruence TheoremD. AAS Triangle Congruence Theorem

PLZZZ help!!Which theorem would show that the two right triangles are congruent?A. SAS Triangle Congruence TheoremB. HL Triangle Congruence TheoremC. ASA Triangle Congruence TheoremD. AAS Triangle Congruence Theorem...

### Discuss the meaning and importance of selective toxicity as it relates to antimicrobials.

Discuss the meaning and importance of selective toxicity as it relates to antimicrobials....

### Soy Eduardo y vivo en una ciudad pequeña. Mi amigo Roberto vive en una ciudad más grande que mi ciudad. En mi ciudad hay tantos semáforos como puentes. Yo camino tanto en las calles de mi ciudad como en los parques. Roberto no corre, su ciudad es peligrosa. Hay más hospitales que museos en la ciudad de Roberto.

Soy Eduardo y vivo en una ciudad pequeña. Mi amigo Roberto vive en una ciudad más grande que mi ciudad. En mi ciudad hay tantos semáforos como puentes. Yo camino tanto en las calles de mi ciudad como en los parques. Roberto no corre, su ciudad es peligrosa. Hay más hospitales que museos en la ci...

### What do you add to 4 6/7 to make 8

what do you add to 4 6/7 to make 8...

### Pls help plsssssssssBalance the following equations:a) CH4 + O2 + CO2 + H2Ob). Mg3N2 + H20 Mg(OH)2 + NH,

Pls help plsssssssssBalance the following equations:a) CH4 + O2 + CO2 + H2Ob). Mg3N2 + H20 Mg(OH)2 + NH,...

### What simple machines are found in a can opener?

What simple machines are found in a can opener?...

### When animals move into and out of an area during normal cycles, it is referred to as: O Emigration O Migrations O Immigration O none of the above

When animals move into and out of an area during normal cycles, it is referred to as: O Emigration O Migrations O Immigration O none of the above...

### Anthony currently earns $11.75 per hour. • He will get a$0.25 raise after 6 months. • He will get a 2.5% raise after an additional 6 months. After Anthony gets both raises, what will his pay be for 38 hours of work? O A. $468.92 o B.$467.40 o C. $465.50 D.$446.50 N

Anthony currently earns $11.75 per hour. • He will get a$0.25 raise after 6 months. • He will get a 2.5% raise after an additional 6 months. After Anthony gets both raises, what will his pay be for 38 hours of work? O A. $468.92 o B.$467.40 o C. $465.50 D.$446.50 N...


text:
There is a newer version of this record available.

Software Open Access

# The Coq Proof Assistant

The Coq Development Team

Matthieu Sozeau
##### Editor(s)
Guillaume Melquiond
##### Other(s)
Léo Andrès; Rin Arakaki; Benjamin Barenblat; Langston Barrett; Siddharth Bhat; Frédéric Besson; Martin Bodin; Simon Boulier; Timothy Bourke; Joachim Breitner; Tej Chajed; Arthur Charguéraud; Pierre Courtieu; Maxime Dénès; Andres Erbsen; Jim Fehrle; Julien Forest; Emilio Jesús Gallego Arias; Gaëtan Gilbert; Matěj Grabovský; Daniel R. Grayson; Jason Gross; Samuel Gruetter; Armaël Guéneau; Sven M. Hallberg; Hugo Herbelin; Jasper Hugunin; Ralf Jung; Sam Pablo Kuper; Ambroise Lafont; Leonidas Lampropoulos; Vincent Laporte; Peter LeFanu Lumsdaine; Pierre Letouzey; Jean-Christophe Léchenet; Nick Lewycky; Yishuai Li; Assia Mahboubi; Cyprien Mangin; Perry E. Metzger; Pierre-Marie Pédrot; Clément Pit-Claudel; Daniel de Rauglaudre; Kazuhiko Sakaguchi; Michael Soegtrop; Paul Steckler; Enrico Tassi; Laurent Théry; Anton Trunov; Théo Winterhalter; Beta Ziliani; Théo Zimmermann

Coq is a formal proof management system. It provides a formal language to write mathematical definitions, executable algorithms and theorems together with an environment for semi-interactive development of machine-checked proofs. Typical applications include the certification of properties of programming languages (e.g. the CompCert compiler certification project, or the Bedrock verified low-level programming library), the formalization of mathematics (e.g. the full formalization of the Feit-Thompson theorem or homotopy type theory) and teaching.

Coq version 8.9 contains the result of refinements and stabilization of features and deprecations or removals of deprecated features, cleanups of the internals of the system and API along with a few new features. This release includes many user-visible changes, including deprecations that are documented in CHANGES.md and new features that are documented in the reference manual. Here are the most important changes:

• Kernel: mutually recursive records are now supported, by Pierre-Marie Pédrot.

• Notations:

• Support for autonomous grammars of terms called "custom entries", by Hugo Herbelin.

• Deprecated notations of the standard library will be removed in the next version of Coq, see the CHANGES.md file for a script to ease porting, by Jason Gross and Jean-Christophe Léchenet.

• Added the Numeral Notation command for registering decimal numeral notations for custom types, by Daniel de Rauglaudre, Pierre Letouzey and Jason Gross.

• Tactics: Introduction tactics intro/intros on a goal that is an existential variable now force a refinement of the goal into a dependent product rather than failing, by Hugo Herbelin.

• Decision procedures: deprecation of tactic romega in favor of lia and removal of fourier, replaced by lra which subsumes it, by Frédéric Besson, Maxime Dénès, Vincent Laporte and Laurent Théry.

• Proof language: focusing bracket { now supports named goals, e.g. [x]:{ will focus on a goal (existential variable) named x, by Théo Zimmermann.

• SSReflect: the implementation of delayed clear was simplified by Enrico Tassi: the variables are always renamed using inaccessible names when the clear switch is processed and finally cleared at the end of the intro pattern. In addition to that, the use-and-discard flag {} typical of rewrite rules can now be also applied to views, e.g. => {}/v applies v and then clears v.

• Vernacular:

• Experimental support for attributes on commands, by Vincent Laporte, as in #[local] Lemma foo : bar. Tactics and tactic notations now support the deprecated attribute.

• Removed deprecated commands Arguments Scope and Implicit Arguments in favor of Arguments, with the help of Jasper Hugunin.

• New flag Uniform Inductive Parameters by Jasper Hugunin to avoid repeating uniform parameters in constructor declarations.

• New commands Hint Variables and Hint Constants, by Matthieu Sozeau, for controlling the opacity status of variables and constants in hint databases. It is recommended to always use these commands after creating a hint databse with Create HintDb.

• Multiple sections with the same name are now allowed, by Jasper Hugunin.

• Library: additions and changes in the VectorDef, Ascii, and String libraries. Syntax notations are now available only when using Import of libraries and not merely Require, by various contributors (source of incompatibility, see CHANGES.md for details).

• Toplevels: coqtop and coqide can now display diffs between proof steps in color, using the Diffs option, by Jim Fehrle.

• Documentation: we integrated a large number of fixes to the new Sphinx documentation by various contributors, coordinated by Clément Pit-Claudel and Théo Zimmermann.

• Tools: removed the gallina utility and the homebrewed Emacs mode.

• Packaging: as in Coq 8.8.2, the Windows installer now includes many more external packages that can be individually selected for installation, by Michael Soegtrop.

Version 8.9 also comes with a bunch of smaller-scale changes and improvements regarding the different components of the system. Most important ones are documented in the CHANGES.md file.

On the implementation side, the dev/doc/changes.md file documents the numerous changes to the implementation and improvements of interfaces. The file provides guidelines on porting a plugin to the new version and a plugin development tutorial kept in sync with Coq was introduced by Yves Bertot http://github.com/ybertot/plugin_tutorials. The new dev/doc/critical-bugs file documents the known critical bugs of Coq and affected releases.

The efficiency of the whole system has seen improvements thanks to contributions from Gaëtan Gilbert, Pierre-Marie Pédrot, and Maxime Dénès.

Maxime Dénès, Emilio Jesús Gallego Arias, Gaëtan Gilbert, Michael Soegtrop, Théo Zimmermann worked on maintaining and improving the continuous integration system.

The OPAM repository for Coq packages has been maintained by Guillaume Melquiond, Matthieu Sozeau, Enrico Tassi with contributions from many users. A list of packages is available at https://coq.inria.fr/opam/www.

Many power users helped to improve the design of the new features via the issue and pull request system, the Coq development mailing list or the coq-club@inria.fr mailing list. It would be impossible to mention exhaustively the names of everybody who to some extent influenced the development.

Version 8.9 is the fourth release of Coq developed on a time-based development cycle. Its development spanned 7 months from the release of Coq 8.8. The development moved to a decentralized merging process during this cycle. Guillaume Melquiond was in charge of the release process and is the maintainer of this release. This release is the result of ~2,000 commits and ~500 PRs merged, closing 75+ issues.

The Coq development team welcomed Vincent Laporte, a new Coq engineer working with Maxime Dénès in the Coq consortium.

Files (8.5 MB)
Name Size
coq-8.9.0-reference-manual.pdf
md5:65cf5057716bfa2f0c07d9f3d78c09f0
2.5 MB
coq-8.9.0.tar.gz
md5:490c89609c1271fe7f20e6ea1bd107b5
6.0 MB
2,925
5,396
views
All versions This version
Views 2,925373
Data volume 14.6 GB5.2 GB
Unique views 2,056304


text:
# Prove that: $\begin{cases} f(\theta_1)\cos \theta_1=f(\theta_2)\cos \theta_2 \\ f(\theta_1)\sin \theta_1=f(\theta_2)\sin \theta_2 \end{cases}$

Let $f(\theta)$ be a continue function for $\theta\in[\theta_1,\theta_2]$. Prove that: \begin{cases} f(\theta_1)\cos \theta_1=f(\theta_2)\cos \theta_2 \\ f(\theta_1)\sin \theta_1=f(\theta_2)\sin \theta_2 \end{cases} if and only if $f(\theta_1)=f(\theta_2)$ and $\theta_2-\theta_1=2n\pi$ for some integer $n$.

It is easily to verify that $\{(\theta_1,\theta_2):\, f(\theta_1)=f(\theta_2), \, \theta_2-\theta_1=2n\pi, \, n\in\mathbb Z\}$ satisfies the system but... is it the only solution of the system?

• Consider $f(\theta)=(\theta-\theta_1)(\theta-\theta_2)$. No need for the $\theta_1-\theta_2$ condition. – Macavity Mar 12 '16 at 9:13

$f(\theta_1)^2=f(\theta_1)^2\sin^2(\theta_1)+f(\theta_1)^2\cos^2(\theta_1)= f(\theta_2)^2\sin^2(\theta_2)+f(\theta_2)^2\cos^2(\theta_2)=f(\theta_2)^2$

then $f(\theta_1)=\pm f(\theta_2)$.

-If $f(\theta_1)= f(\theta_2)$ it is necessary that $\theta_1$ and $\theta_2$ differ for a multiple of $2\pi$.

-If $f(\theta_1)=- f(\theta_2)$ you have to find $\theta_1$ and $\theta_2$ such that \begin{align} \sin(\theta_1)&=-sin(\theta_2) \\ \cos(\theta_1) &=-\cos(\theta_2) \end{align} and it is true for $\theta_2=\theta_1+\pi+2k\pi,k\in \mathbb{Z}$ (note that this was true if $f(\theta_1)\neq 0\neq f(\theta_2)$).

There are then three sets of solutions $$f(\theta_1)=f(\theta_2) \qquad \text{and} \qquad \theta_2=\theta_1+2k\pi$$

$$f(\theta_1)=-f(\theta_2) \qquad \text{and} \qquad \theta_2=\theta_1+\pi+2k\pi$$

$$f(\theta_1)=f(\theta_2)=0 \qquad \text{and} \qquad \forall \theta_1,\theta_2 \in \mathbb{R}$$

Let's suppose that $f$ is a solution of the equation. Using that $\sin^2 \theta + \cos^2 \theta = 1$ we have:

$$f(\theta_1)^2 = f(\theta_1)^2\sin^2 \theta_1 + f(\theta_1)^2 \cos^2 \theta_1 = f(\theta_2)^2\sin^2 \theta_2 + f(\theta_2)^2 \cos^2 \theta_2 = f(\theta_2)^2$$

Hence, $\vert f(\theta_1) \vert = \vert f(\theta_2) \vert$. This fact reduces the possible solutions to the following cases:

• $f(\theta_1) = f(\theta_2) \ne 0$. Consequently, dividing in the equations we have $\cos \theta_1 = \cos \theta_2$ and $\sin \theta_1 = \sin \theta_2$. Thus, $\theta_1 - \theta_2 = 2\pi n$ with $n \in \mathbb{Z}$. Clearly, these are solutions.

• $f(\theta_1) = f(\theta_2) = 0$. Then, no condition is needed in $\theta_1$ and $\theta_2$ to obtain a solution.

• $f(\theta_1) = - f(\theta_2) \ne 0$. Dividing again we have $\cos \theta_1 = - \cos \theta_2$ and $\sin \theta_1 = - \sin \theta_2$. Hence, $\theta_1 - \theta_2 = (2n+1)\pi$ with $n \in \mathbb{Z}$. Again, these are solutions too.

Note that we haven't used the continuity of $f$. If you want to obtain only the first type of solutions, then you could add as hypothesis that $f(\theta) \ne 0 \ \forall \theta \in [\theta_1, \theta_2]$. The second case is not possible anymore. Furthermore, the third case tells us that $f(\theta_1)f(\theta_2) < 0$ and using Bolzano's theorem we would have a zero in $\left(\theta_1, \theta_2\right)$, what is not possible.


text:
Let’s experiment a bit with Hibernate. We want to model the tables employee and shift. Each employee has multiple shifts (and each shift belongs to an employee). We want an employee table and a shift table (which has the employee_id as a foreign key).

// Employee.java
@OneToMany(targetEntity=Shift.class) public List getShifts() {...}
// Shift.java
@ManyToOne public Employee getEmployee() {...}

The code above generates the following tables: employee, employee_shift and shift. Time to read the documentation and discover the mappedBy attribute.

// Employee.java
@OneToMany(targetEntity=Shift.class, mappedBy="employee") public List getShifts() {...}

Ok, now we get the tables we want. Let’s remove an employee that has shifts referencing him. An exception is thrown because of a foreign key constraint.

// Employee.java

// Employee.java

// Main.java
Employee employee = new Employee();
Shift shift = new Shift();
Vector shifts = new Vector();
employee.setShifts(shifts);
em.persist(employee);

With the code above the foreign key of shift will NULL instead of the employee_id. According to the documentation it is expected behaviour that cascading inserts only work when the children are saved.

// Employee.java
// Main.java
Employee employee = new Employee();
Shift shift = new Shift();
shift.setEmployee(employee);
Vector shifts = new Vector();
employee.setShifts(shifts);
em.persist(employee);

It appears we can get cascading inserts to work as long as we do not forget to set the employee. We add a constraint so employee can not be null.

// Shift.java
@ManyToOne @Column(nullable=false) public Employee getEmployee() {...}
// Main.java
Shift shift = new Shift();
em.persist(shift);

WTF? I can persist a NULL reference anyway? The value for employee_id is allowed to be NULL? Have we found a bug? Let’s check the documentation:

// Shift.java
@ManyToOne @JoinColumn(nullable=false) public Employee getEmployee() {...}
// Main.java
Shift shift = new Shift();
em.persist(shift);

Ok, now are getting somewhere. And exception is thrown if we try to persist a shift that references to an employee that does not exist in the database yet.

// Shift.java

CascadeType.ALL means that i want to cascade events on ALL events. My only requirements where that i cascade on PERSIST (insert) and on REMOVE (delete). So i need to change my annotation as following:

// Employee.java
@OneToMany(
targetEntity=Shift.class,
mappedBy="employee",


text:
Register

# 2.1. Spotlight: Carl Friedrich Gauss¶

## 2.1.1. Spotlight: Carl Friedrich Gauss¶

He lives everywhere in mathematics.

—E.T. Bell, Men of Mathematics

Carl Friedrich Gauss is considered by many the greatest mathematician who ever lived. He was born in Brunswick, Germany on April 30, 1777. Gauss was a child prodigy, who was reported as able to perform long computations in his head. At age 10 he studied algebra and analysis. He made his first fundamental discoveries while still a teenager. Among these was the least squares method for handling statistical data and a proof that a regular 17-sided polygon can be constructed with only a straightedge and a compass. This was the first result of its kind since discoveries by the Greeks 2,000 years earlier.

He completed his monumental book on number theory, Disquisitiones Arithmeticae in 1798 at the age of 21 [Gauss65]. It summarized previous work in a systematic way and introducing many fundamental ideas of his own.

In 1801, the same year Disquisitiones Arithmeticae was published, the asteroid Ceres was observed by astronomers. Unfortunately, they could only make observations across 3 degrees of the sky before it was obscured by the sun. Several months later, when Ceres should have reappeared, Piazzi could not locate it: the mathematical tools of the time were not able to extrapolate a position from such a scant amount of data—three degrees represent less than 1% of the total orbit. In what seemed a superhuman feat at the time, Gauss used the available data to calculate the orbit of Ceres. As part of his work, he showed that experimental data varies within a bell-shaped curve, now called the Gaussian distribution. This achievement established his reputation as a genius before the age of 25.

Gauss also developed tables of logarithms now known as Gaussian logarithms.

Gaussian logarithms are designed to facilitate finding the common logarithm of a sum or difference of two numbers whose common logarithms are known. The object of a table of Gaussian logarithms, sometimes known as Addition and Subtraction Logarithms, is to give $\log (a \pm b)$ by single entry when $\log a$ and $\log b$ are known.

When Gauss died, many unpublished notes and manuscripts were found in his desk. When his complete Collected Works were finally published later, it had taken a group of scientists nearly seventy years to review and edit his writings.

Today Gauss’s name occurs in many places in mathematics and science:

• The normal probability distribution as also called the Gaussian curve or distribution

• Gauss’s Laws for Gravity and Electrostatics

• The hypergeometric series, a.k.a the Gaussian series

• Gaussian equations in spherical trigonometry

• Gaussian curvature in differential geometry

• Gaussian optics and Gaussian beams describing electromagnetic radiation

Gauss died in Göttingen, at the age of 78 on February 23, 1855. In Brunswick, there is a statue of him. Its base is, appropriately, a 17 pointed star.

1

Gottlieb Biermann, Portrait of Carl Friedrich Gauss By Gottlieb Biermann A. Wittmann (photo) [Public domain], via Wikimedia Commons


text:
The Art of Testing Less Without Sacrificing Quality

The Art of Testing Less Without Sacrificing Quality – Herzig et al. 2015

Why on earth would anyone want to test less? Maybe if you could guarantee the same eventually quality, and save a couple of million dollars along the way…

By nature, system and compliance tests are complex and time-consuming although they rarely find a defect. Large complex software products tend to run on millions of configuration in the field and emulating these configurations requires multiple test infrastructures and procedures that are expensive to run in terms of cost and time. Making tests faster is desirable but usually requires enormous development efforts. Simply removing tests increases the risk of expensive bugs being shipped as part of the final product… At the same time, long running test processes increasingly conflict with the need to deliver software products in shorter periods of time while maintaining or increasing product quality and reliability. Increasing productivity through running less tests is desirable but threatens product quality, as code defects may remain undetected.

So long as you run every test eventually you’re guaranteed to catch all defects that would have been caught. That means there’s a trade-off you can make between the costs of executing a test now, and the (increased) costs of possibly finding a defect later in the cycle. Herzig et al. present THEO, which evaluates these costs and chooses the path with the lower expected cost. The evaluation is done in the context of Microsoft’s Office, Windows, and Dynamics products, which means we also get some really interesting data on these costs at Microsoft.

The results (in simulation) cover more than 26 months of industrial product execution and more than 37 million test executions, and the savings are impressive:

THEO would have reduced the number of test executions by up to 50% cutting down test time by up to 47%. At the same time, product quality was not sacrificed as the process ensures that all tests are ran at least once on all code changes. Removing tests would result in between 0.2% and 13% of defects being caught later in the development process, thus increasing the cost of fixing those defects. Nevertheless simulation shows that THEO produced an overall cost reduction of up to $2 million per development year, per product. Through reducing the overall test time, THEO would also have other impacts on the product development process, such as increasing code velocity and productivity. These improvements are hard to quantify but are likely to increase the cost savings estimated in this paper. The technique and results described in this paper have convinced an increasing number of product teams, within Microsoft, to provide dedicate resources to explore ways to integrate THEO into their actual live production test environments. Let’s take a look at the model THEO uses. THEO does not require any additional test case instrumentation, and uses only the test name, time taken for the test to run, and test result as input. This data is already collected by test runners. The test result could be a pass or a fail, and if it’s a fail it could be because of a genuine defect or because of a problem with the test case itself (false positive). By tying failed tests back to raised bug reports, THEO is able to distinguish between these two scenarios . If the bug report results in a (non test-)code fix the test is presumed to have found a code defect, otherwise it is assumed to have been a false alarm. If the failure was not investigated the outcome is ‘unknown.’ Tests run in different execution contexts (and may have different probabilities of finding bugs in different contexts). An execution context is a collection of properties – for the study BuildType, Architecture, Language, and Branch were used. This is a crucial point as a test may show different execution behaviors for different execution contexts. For example, a test might find more issues on code of one branch than another depending on the type of changes performed on that branch. For example, tests cases testing core functionality might find more defects on a branch containing kernel changes than on a branch managing media changes. Thus, our approach will not only differentiate between test cases, but also bind historic defect detection capabilities of a test to its execution context. At the core of the model are estimates of the probability that a given test execution will find a genuine defect (true positive), and that it will raise a false alarm (false positive). Pdefect(test,context) = #detectedDefects(test,context) / #executions(test,context) PfalsePositive(test,context) = #falseAlarms(test,context) / #executions(test,context) All pretty straightforward… Both probability measurements consider the entire history from the beginning of monitoring until the moment the test is about to be executed. Consequently, probability measures get more stable and more reliable the more historic information we gathered for the corresponding test. Given these probabilities, all that remains is to estimate the associated costs. If the estimated cost of skipping a test, Costskip, is less than the estimated cost of executing a test, Costexec then THEO will skip the test (with the proviso that every test eventually gets executed). The cost of executing a test is captured as a function of the machine time spent on test execution and time wasted on investigating false positives: Costexec = Costmachine + (PfalsePositive * Costinspect) For the Microsoft development environment, Costmachine was estimated at$0.03/hour, corresponding roughly to the cost of a memory intense Azure image including power and hardware consumption as well as maintenance.

Costinspect at Microsoft is $9.60. “It considers the size of the test inspection teams, the number of inspections performed and the average salary of engineers on the team.” The cost of skipping a test is captured as a function of the probability that the test would have found a genuine defect, the (increased) cost of fixing a defect found later in the cycle, the delay before the defect is found, and the number of engineers affected. Costskip = Pdefect * Costescaped * Timedelay*#Engineers The constant Costescaped represents the average cost of an escaped defect. This cost depends on the number of people that will be affected by the escaped defect and the time duration the defect remains undetected. We used a value of$4.20 per developer and hour of delay for Costescaped. This value represents the average cost of a bug elapsing within Microsoft. Depending on the time the defect remains undetected and the number of additional engineers affected, elapsing a defect from a development branch into the main trunk branch in Windows can cost tens of thousands of dollars.

The #Engineers is determined by counting the number of engineers whose code changes pass the code branch. Timedelay is the average timespan required to fix historic defects on the corresponding branch.

The final piece of the puzzle is ensuring that every test gets executed eventually:

To ensure this happens we use two separate criteria, depending on the development process:

• Option 1: For single branch development processes, e.g. Microsoft Office, we enforce each test to execute at least every third day. Since all code changes are applied to the same branch, re-execution of each test for each execution context periodically ensures that each code change has to go through the same verification procedures as performed originally.
• Option 2: For multi-branch development processes, e.g. Microsoft Windows, we enforce to execute a combination of test and execution context on the branch closest to trunk on which the test had been executed originally.


text:
# Why are the domains for $\ln x^2$ and $2\ln x$ different?

If I have a function like this $f(x)=2 \ln(x)$ and I want to find the domain, I put $x>0$. But if I use the properties of logarithmic functions, I can write that function like $f(x)=\ln(x^2)$ and so the domain is all $\mathbb{R}$ and the graphic of function is different. Where is the mistake?

• You can't have a function without having a domain. You can have an expression however and then ask for what values is the expression meaningful. That seems to be what you're doing. – zhw. Nov 4 '16 at 21:31
• My question is: why for example $ln(x)+ln(x-3)$ that is the same of $ln(x(x-3))$ have two different domains and graphs. – L.G.A.G. Nov 4 '16 at 22:13
• @L.G.A.G. They are the same where they are both defined, but they need not be defined in the same places. This is a tricky thing about logarithms that I find precalculus references don't cover very well. – Ian Nov 5 '16 at 2:23
• just because they tell you in algebra that you can't have log(n) n<=0 doesn't mean that you can't... youtube.com/watch?v=IX_23EWpF5U also youtube.com/watch?v=soFDU-1knNE – cmarangu Jul 6 at 0:09

## 5 Answers

First, you could use $\ln x$ to define functions with different domains as long as $\ln x$ is defined in that domain.

Second, the rule $\ln x^n=n\cdot \ln x$ is a bit sloppy. It should always be pointed out that $x>0$. Likewise, $\ln ab=\ln a+\ln b$, only if $a,b>0$.

Note that: $$\ln (x^2)=2\ln |x| \ne 2 \ln x$$

so the two functions are different and have different domains.

• Thanks. But if I take $ln(x)+ln(x-3)$, this function is $ln(x(x-3))$ from the properties of logarithmic functions, but the domains are different. Why if they should be the same thing? – L.G.A.G. Nov 4 '16 at 18:26

The functions $f(x) =2 \ln x$ and $g(x) = \ln x^2$ have different domains. The domain of $f$ is $(0,\infty)$, and the domain of $g$ is $\mathbb{R} - \{0\}$. But as you said, when $x$ is in the domain of $f$ and the domain of $g$, we have $f(x) = g(x)$.

The domain of a function is part of its definition. Restricting ourselves to functions from subsets of the real numbers to the real numbers, the logarithm function $x \mapsto \ln x$ is defined to have the domain $(0,\infty) \subset \mathbb R$. (I mention the restriction to $\mathbb R$ because there is also a function named $\ln$ whose domain is the non-zero complex numbers.)

There is nothing to stop you from defining a function with $f_1$ with domain $[17,23]$ such that $f_1(x) = \ln x$ whenever $17\leq x \leq23$. The new function $f_1$ does not have all of the nice properties of $\ln$, for example it is never true that $f_1(x) + f_1(y) = f_1(xy)$, because $x$, $y$, and $xy$ cannot all simultaneously be in the domain of $f_1$. Nevertheless, $f_1$ is a perfectly well-defined function, even if it is far less useful than $\ln$, just as the function $\ln$ with domain $(0,\infty)$ is a perfectly-well defined function despite being less useful (for some purposes) than the complex principal logarithm function.

Because the domain of $f_1$ is different from the domain of $\ln$, $f_1$ is not the same function as $\ln$.

Now you want to define a function with the formula $f(x) = 2 \ln x$, but the definition needs a domain. I would argue that there is no such thing as "the" domain for a function defined by that formula, since it is possible to use the mapping $x \mapsto 2 \ln x$ to define functions over many different domains such as $(0,10]$, $[17,71]$, or $(3,4]\cup[10,11)\cup\{37\}$, but there is a maximal domain for functions of that kind, namely, the union of the domains of all possible functions that can be defined by that formula. That domain is again $(0,\infty)$. So if someone asks me for "the" domain of $f(x) = 2 \ln x$ I would guess that they meant the domain $(0,\infty)$; it is the "best" choice for most purposes.

An alternative definition of the function $f(x) = 2 \ln x$ on the domain $(0,\infty)$ is to say that $f(x) = \ln(x^2)$ when $x \in (0,\infty)$. This is the same function because it has the same domain and takes the same value at each point in that domain.

It is also possible to define a function $g(x) = \ln(x^2)$ for all $x \in \mathbb R - \{0\}$. That is a perfectly well-defined function, but it is a different function than $f$ since it has a different domain.

Natural log of x^2 can take negative values because they are squared before they are fed to the logarithm function.


text:
# ECDSA Public Key generation

Referring to both

I can understand that, given $\mathcal{E} = \mathcal{E}(a,\,b,\,\mathbb{F}_{2^m})$ as our elliptic curve on $\mathbb{F}_{2^m}$ group

• $G \in \mathcal{E}$ is a generator of the group, i.e. $\exists n: n\times G = O$
• $n$ is the order of point $G$ with respect to the group
• choosen randomly $d_A\in[1,n-1]$ as a private key, $Q_A\triangleq n \times d_A$ is the public one.

Got it, but in the "Key pair validation from Bob" process, I see that $Q_A$ must respect these bounds:

• $Q_A \neq O$ (trivial)
• $Q_A \in \mathcal{E}$ (trivial)
• $Q_A\times n = O$

I can't really understand the last thing. I'm not very acquainted with EC algebra, but comparing $Q_A\times n = O$ with $n\times G = O$ seems the same thing, so I would conclude that $Q_A=G$, which is clearly false.

What am I missing?

-
Note that $\mathbb{F}_{2^m}$ is a field, not a group. It has two operations, addition and multiplication. The points on the elliptic curve are pairs of elements of that field. The points form a group, which has just one operation. The operation could be denoted as either addition or multiplication, but by convention we use additive notation because the operation is commutative. Multiplying a positive integer by an elliptic curve point means to add the point to itself that many times. – Brock Hansen Apr 16 '14 at 21:19

Actually you have a bug in your step of key generation, it should be $Q_A=d_A \times G$ and you want to have a point $G$ of large prime order $n$ such that the ECDLP is hard on the group.

The last check ensures that the public key $Q_A$ is a point of order $n$. If this is the case, then $Q_A\times n = (d_A \times G)\times n = d_A\times(n\times G)=d_A\times O=O$.

This check seems simply to rule out the generation of public keys that lie in a small order subgroup (and thus could be easy to break) - which makes no sense if you have a prime order group but can happen if you have an almost prime order group (you have subgroups of order of divisors of the cofactor). Just a mechanisms to check if the key generation did not generate such a key for you (it should not happen in practice that you generate such a keypair), but the implementation may be messy and you can check that with this test.

-


text:
PREPRINT 17/2004

Maxim Vsemirnov

GROUPS G_2(p) AS QUOTIENTS OF (2,3,7;2p)

This preprint was accepted November 10, 2004

ABSTRACT:
We prove that for any prime $p\ge 5$ the group $G_2(p)$
is a quotient of $(2,3,7;2p)=\langle X,Y:X^2=Y^2=(XY)^7=[X,Y]^{2p}=1\rangle$.
[Full text:
(.ps.gz)]

Back to all preprints

Back to the Steklov
Institute of Mathematics at St.Petersburg


text:
MongoDB TextScore

I m new to MongoDB, for me I need to search the name " Raja Sekar " from name field in the database,

I have indexed it. But my condition is search term should match 75 percent of similar records.

Can you please help me with this

db.customers.find({$text: {$search: "raja sekar kumar"}}, {score: {$meta: "textScore"}}).sort({score:{$meta:"textScore"}})

Source: Laravel