You are not logged in.
Ah, I think I get the hang of the game.
Make your first move. If you have two or more black pegs, we are done (1 step). Otherwise you have either 0 or 1 black peg.
Case 1: 0 black pegs.
Try again, using a different colour for each position.
… (i) If you get 0 black pegs again, you know the correct combination (it’s the one where each position has the colour you haven’t tried for it) – and you can play it on your third move. In this case we achieve two or more black pegs in 3 steps.
…(ii) If you get 2 black pegs, we are done (2 steps).
…(iii) If you get 1 black peg, leave two colours and change one.
… … (a) If this gives you 0 black pegs, the colour you’ve changed was right before. In this case repeat step 1(i) and we are done in 4 steps.
… … (b) If this gives you 2 black pegs we are done (3 steps).
… … (c) If this gives you 1 black peg, the colour you’ve changed is still wrong – AND was wrong before. In this case you know the right colour for that position so you can put the right colour in that position for the rest of your movves. The black peg is for one of the other two positions. Change one of them. If the one you change is not the black-peg one, we are done (4 steps). Otherwise restore this colour and we are done (5 steps).
Case 2: 1 black peg.
Leave two colours and change one.
… (i) If you get 2 black pegs, we are done (2 steps).
… (ii) If you get 0 black pegs, the colour you’ve changed was right before. Restore it and change one of the other two.
… … (a) If this gives you 2 black pegs we are done (3 steps).
… … (b) If this gives you 1 black peg the colour you’ve changed is still wrong – AND was wrong before. So you know the correct colour for that position and we are done in 4 steps.
… … (c) You can’t get 0 black pegs because at this stage you already definitely the colour of one position.
… (iii) If you still get 1 black peg, the colour you’ve changed is still wrong – AND was wrong before. In this case you know the right colour for that position so you can put the right colour in that position for the rest of your moves. The black peg is for one of the other two positions. Change one of them. If the one you change is not the black-peg one, we are done (3 steps). Otherwise restore this colour and we are done (4 steps).
So the most number of steps you need to take is actually 5 (Case 1(iii)(c)) if you reason correctly.
It is exactly a year since I was discovered in the forests of South America.
Examine their domains (i.e. values for which each function is defined). Take, for example, x = −4. Is f and/or g defined at this value?
This is known as the sandwich theorem or squeeze theorem.
Can you please explain "Hence there are 27 − 6 − 1 = 20 permutations giving at most one black peg"?
There are 6+1 permutations that earn at least two black pegs in the game so the number of those that give you at most one black peg is 27−(6+1).
Indeed:
[list=*]
[*]
Proof:
[list=*]
[*]
Well, just from the way you phrase the question, the answer is 1. You might strike it lucky on your first move.
But I think you mean what is the minimum number of moves needed to be guaranteed at least two black pegs, assuming a worst-case scenario. Since repetition of colours are allowed there are 3³ = 27 permutations altogether. To get exactly two black pegs, the wrong position can be any of the 2 wrong colours, and there are 3 positions for the wrong colour to be, so there are 3 × 2 = 6 such permutations. And there is only 1 permutation for three black pegs (the winning sequence). Hence there are 27 − 6 − 1 = 20 permutations giving at most one black peg.
Therefore the answer to your question (assuming you don’t duplicate any of your moves) is 21. In the worst-case scenario you would try all the 20 permutations giving fewer than two black pegs first before you get warmer.
You need to use the fact that there are some stones:
Butterfly = Flutter by
You have to do two things:
[list=1]
[*]Show that CD is twice as long as AB.[/*]
[*]Show that AC is perpendicular to BD[/*]
[/list]
1. is straightforward. Let E be the foot of the perpendicular from A to CP and F the foot of the perpendicular from B to PD. Then AEFB is a rectangle, AE bisects CP and BF bisects PD, and |CD| = |CP| + |PD| = |CE| + |EP| + |PF| + |FD| = 2|EP| + 2|PF| = 2|EF| = 2|AB|.
2. is more complicated. I’m afraid I can’t do it geometrically but I can do it using co-ordinate algebra. The working is too complicated so I’ll omit it here.
Using 1. and 2. we can solve the problem. Let Q be the midpoint of CD (so |CQ| = |QD| = |AB|). Then QB is perpendicular to BD since AC is perpendicular to BD and ACQB is a parallelogram. Thus QB is the perpendicular bisector in triangle QDG, where G is the point on BD extended on the side of B such that |DB| = |BG|. Also (by similar triangles) QG intersects AB at R, the midpoint of AB. Now triangle RBG is similar to triangle QDG and so is an isoscles triangle. Thus |RB| = |RG|. But by similar triangles |RG| = |RQ|. Thus |RB| = |RQ|. QED.
We don’t actually need K. We just have to test whether A is divisible by any prime less than √A.