A housewife is travelling to market with all her eggs in one basket. She has between 100 and 200 eggs in the basket. Counting in threes there are 2 eggs leftover, counting in fives there is 1 egg leftover and counting in sevens there are 4 eggs leftover. How many eggs are in the basket?
x = 2 (MOD 3) x=1 (MOD 5) x=4 (MOD 7)
x=11 (MOD 15) x=4 (MOD 7)
Can u solve for x?
x=11 (MOD 105)
So, x=105+11=116 eggs
Do u know MODULAR ARTHEMETIC.
@Lcoohill ???
cheers yes that is answer i got also thank you 11 mod 105 105 + 11 = 116
GREAT
Let eggs be the number of eggs. Using Mathematica's constrained optimization function, Maximize: Maximize [ {eggs, Mod[eggs, 3] == 2, Mod[eggs, 5] == 1, Mod[eggs, 7] == 4, eggs >= 100, eggs <= 200}, {eggs}, Integers ] {116, {eggs -> 116}} http://reference.wolfram.com/mathematica/tutorial/ConstrainedOptimizationIntroduction.html
Join our real-time social learning platform and learn together with your friends!