Click here to Skip to main content
15,902,634 members
Home / Discussions / Algorithms
   

Algorithms

 
GeneralRe: Finding several extra/missing numbers Pin
supercat919-Dec-08 8:56
supercat919-Dec-08 8:56 
GeneralRe: Finding several extra/missing numbers Pin
Luc Pattyn19-Dec-08 9:36
sitebuilderLuc Pattyn19-Dec-08 9:36 
GeneralRe: Finding several extra/missing numbers Pin
supercat921-Dec-08 12:28
supercat921-Dec-08 12:28 
GeneralRe: Finding an extra/missing number Pin
cp987619-Dec-08 11:46
cp987619-Dec-08 11:46 
GeneralRe: Finding an extra/missing number Pin
Luc Pattyn19-Dec-08 12:48
sitebuilderLuc Pattyn19-Dec-08 12:48 
GeneralRe: Finding an extra/missing number Pin
supercat920-Dec-08 15:57
supercat920-Dec-08 15:57 
GeneralRe: Finding an extra/missing number [modified] Pin
cp987621-Dec-08 13:58
cp987621-Dec-08 13:58 
GeneralRe: Finding an extra/missing number Pin
supercat922-Dec-08 9:58
supercat922-Dec-08 9:58 
1,3,5,7 would yield a total of 16 missing, a bit 0 subtotal of 16 (1+3+5+7), a bit 1 subtotal of 10 (3+7), and a bit 2 subtotal of 12 (5+7). Even the total and bit 0 subtotal suffice to show that the numbers are 1, 3, 5, and 7; since the bit 0 subtotal matches the total, all four numbers have to be odd. The smallest 4 odd numbers are 1, 3, 5, and 7; if any other numbers were chosen the total would exceed 16.

A breaking set of numbers would be {1,6,10,13) or (2,5,9,14). The carries from each bit position to the next serve to confuse things; using modulo arithmetic on each bit avoids that complication.
GeneralRe: Finding an extra/missing number Pin
Mark Churchill22-Dec-08 18:55
Mark Churchill22-Dec-08 18:55 
GeneralRe: Finding an extra/missing number Pin
supercat923-Dec-08 6:55
supercat923-Dec-08 6:55 
GeneralRe: Finding an extra/missing number Pin
stevepqr8-Jan-09 5:59
stevepqr8-Jan-09 5:59 
AnswerRe: Question from my Phone Interview Pin
C Change25-Jan-09 0:55
C Change25-Jan-09 0:55 
QuestionWhat is Combinatorial Optimization? Pin
alexdow13-Dec-08 9:39
alexdow13-Dec-08 9:39 
AnswerRe: What is Combinatorial Optimization? Pin
Alan Balkany15-Dec-08 3:57
Alan Balkany15-Dec-08 3:57 
QuestionSome kind of LCS Pin
aggressorus9-Dec-08 7:22
aggressorus9-Dec-08 7:22 
Questionhelp me About Big O Pin
bosszy7-Dec-08 2:00
bosszy7-Dec-08 2:00 
GeneralRe: help me About Big O Pin
Luc Pattyn7-Dec-08 6:32
sitebuilderLuc Pattyn7-Dec-08 6:32 
AnswerRe: help me About Big O Pin
Paul Conrad9-Dec-08 11:37
professionalPaul Conrad9-Dec-08 11:37 
GeneralRe: help me About Big O Pin
Luc Pattyn9-Dec-08 13:13
sitebuilderLuc Pattyn9-Dec-08 13:13 
GeneralRe: help me About Big O Pin
Paul Conrad9-Dec-08 13:15
professionalPaul Conrad9-Dec-08 13:15 
AnswerRe: help me About Big O Pin
73Zeppelin10-Dec-08 18:51
73Zeppelin10-Dec-08 18:51 
AnswerRe: help me About Big O Pin
J. Andrew Smith6-Mar-09 3:16
J. Andrew Smith6-Mar-09 3:16 
QuestionCholeski's Algorithm Pin
BobInNJ6-Dec-08 6:06
BobInNJ6-Dec-08 6:06 
AnswerRe: Choleski's Algorithm Pin
73Zeppelin6-Dec-08 6:36
73Zeppelin6-Dec-08 6:36 
GeneralRe: Choleski's Algorithm Pin
BobInNJ7-Dec-08 2:30
BobInNJ7-Dec-08 2:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.