+ 5
Help me please
21 Respostas
+ 5
given n numbers
after n-1 clicks following the rule above you have 1-1 and the rest 0.
for n%3 =2 the rest is 3*i and u can eliminate the zeros by grouping them in groups of 3 zeros.
after n-1 clicks following rule above you have a single 1 and the rest zeros.
for n%3=1 it works too.
1110 0101 1000 1111 for n=4.
outstanding: it does not work for n%3=0
+ 5
nice Avatar by the way.
Who gave you that puzzle?
why you have to solve it?
+ 5
proof : It will not work for 3*n Sectors
- name all Sectors with a,b,c... so we have sectors
a-b-c-a-b-c-a-b-c .... for 3*n sectors the circle will close here
The parity of a is even, if an even number of a-fields has a value 1. Otherwise the priority is odd.
The same with b and c.
Lets have a first situation:
a, b and c cant have the same parity since the number of a-fields, b-fields and c-fields are the same, but one a-field has value 0 inside.
How does the situation change on each step?
On each step we touch a a-field, a b-field and a c-field.
All three parities change.
====> The parities of a, b and c can never be the same!
But: The paritys at the desired status are equal: For a,b,c they are the same as sectors/3.
Example 110111
abcabc
priority of a: 2 a-fields with 1 ->even
priority of b: 2 b-fields with 1 ->even
priority of c: 1 c-field with 1 ->odd
----> not all parities are equal
Do the step: 101011
abca
+ 4
not yet done try my best.
+ 4
javscript
+ 4
u can ask on SL to write a programm for that prob with number of sectors as Input,
It is not too complicated.
+ 4
i found it in the web, i must have a program to test some numeruc value of n , for help me to solve mathematicly this problem .
+ 3
@Oma Falk
+ 3
Strong assumption:
It works for n = 5+3*i
It is simple.
If the first zero is on 12'o clock, always click the next zero generated on the right until you have two 1 and the rest zeros in a row.
now in groups of three reset zeros to one.
U may try with 11.
https://studio.code.org/projects/applab/4nJ9l4yLIOlt6729tK7EpD9iK5V-eN_d8m0HTmHg_HQ
+ 3
for all n such that n%3=2 and n=>3 ?
+ 3
5 , 8 , 11 are equal 2 modulo 3
????
+ 3
i wrong or what?
+ 3
Mrs Oma Falk ,show me your proof please .
+ 3
how you could do this web page( the studio code)????!!!
+ 3
Since I am no web-developer it was easier for me to do it that way
https://studio.code.org/home
It is thought for children but ... well I like it too.
If you wanna you can mix my project.
Not too much to do for other numbers.
btw besides some static Elements the code is this.
Maybe some webbers will do it on sololearn
var Buttons = [];
var id = "";
var radius = 100;
var x = 150;
var y = 250;
var num = 11;
console.log("123".substring(1,4))
for (var i = 0; i < 11; i++) {
id = "b"+String(i);
button(id,"1");
var xpos = x+radius*(Math.cos(2*Math.PI/num*i));
var ypos = y+radius*(Math.sin(2*Math.PI/num*i));
setPosition(id, xpos,ypos);
}
setText("b0","0")
onEvent("b0", "click", theClick) ;
onEvent("b1", "click", theClick) ;
onEvent("b2", "click", theClick) ;
onEvent("b3", "click", theClick) ;
onEvent("b4", "click", theClick) ;
onEvent("b5", "click", theClick) ;
onEvent("b6", "click", theClick) ;
onEvent("b7", "click", theClick) ;
onEvent("b8", "click", theClick) ;
onEvent("b9", "click", theClick) ;
onEvent("b10", "click", theClick) ;
function theClick(event) {
var id = (event.targetId);
console.log(id)
var otherIdNum;
var otherId;
var valOfBut
var idnum = parseInt(id.substring(1, 3))%11;
if (getText(id) == "1") return;
for (j=-1;j<2;j++){
otherIdNum = (idnum + j)%11;
if (otherIdNum < 0){
otherIdNum += 11
}
otherId = "b"+String(otherIdNum);
valOfBut = getText(otherId);
if (valOfBut == "1") setText(otherId,"0")
else setText(otherId,("1"))
}
};
onEvent("Back", "click", function(event) {
for (var i = 1; i < 11; i++) {
id = "b"+String(i);
setText(id,"1")
}
setText("b0","0");
}
)
+ 3
whats this langague?
+ 2
5,8,11,
n%3 = 1 (-;
+ 2
ok
+ 2
no... my concentration is low
+ 2
Kishalaya Saha thanks for joining this great post.
parity... right.