expression □ □ □ □ Each slot must only contain one number which should only be 2 , 3 , 4 , or 5 . Once that number is placed in a slot, it cannot be used again on another inside the expression.
In the equality below, apply the rule above. In each of the expressions, each slot must only contain one of the four mentioned numbers. After doing so, the expressions should be equal to each other. Example: 2 3 4 5 = 4 5 2 3
How many equalities can there be?
□ □ □ □ = □ □ □ □
Note: It still counts if the two expressions are completely the same, like 5 4 3 2 = 5 4 3 2 .
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Let's list all of the possible permutations that can be put in the expression.
Expression 2 3 4 5 2 3 5 4 2 4 3 5 2 4 5 3 2 5 3 4 2 5 4 3 3 2 4 5 3 2 5 4 3 4 2 5 3 4 5 2 3 5 2 4 3 5 4 2 4 2 3 5 4 2 5 3 4 3 2 5 4 3 5 2 4 5 2 3 4 5 3 2 5 2 3 4 5 2 4 3 5 3 2 4 5 3 4 2 5 4 2 3 5 4 3 2 Product 8 1 9 2 5 0 0 0 3 8 8 8 2 0 0 0 2 5 9 2 2 0 4 8 9 2 1 6 5 6 2 5 2 5 9 2 2 0 2 5 3 8 8 8 3 8 8 8 3 8 8 8 2 0 0 0 2 0 4 8 1 6 0 0 8 1 9 2 9 2 1 6 2 0 2 5 1 6 0 0 2 0 0 0 2 0 0 0 5 0 0 0 5 6 2 5 Number of Appearance of the Product 2 2 4 4 2 2 2 2 2 2 4 4 4 4 2 2 2 2 2 2 4 4 2 2
The total number of possible permutations is 2 4 . The right row indicates how many times the (expression's) product on its left appeared in the list. Knowing all of these, we can get how many equal pairs there can be.
If a product were to appear once in the list, then its expression can be paired to itself. In this case, there are no products that only appear once in the list. If a product appears twice in the list, then its expression can be paired to itself and onto the other expression which is equal to it. For example, 5 0 0 0 appears as a product of two expressions which are 2 3 5 4 and 5 4 2 3 . Then 2 3 5 4 can be paired to 2 3 5 4 ( itself ) and 5 4 2 3 , i.e.
2 3 5 4 = 2 3 5 4 or
2 3 5 4 = 5 4 2 3
, making two pairs. The number of appearances of a product indicates how many pairs there can be using its originating expressions.
Adding all the numbers of appearance of the products, we can get the number of equal pairs, which is 6 4 .
Since I did this manually, I'm eager to see other solutions for this problem.
Problem Loading...
Note Loading...
Set Loading...
<?php
//build all 4 digit combinations (2345 through 5432)
$arr = array(2,3,4,5);
do{
$newarr = array();
foreach($arr as $a){
for($i=2; $i<=5; $i++){
if( !preg_match('@'.$i.'@',$a) ){
$newarr[] = $a.$i;
}
}
}
$arr = $newarr;
} while( strlen( $arr[0] ) < 4 );
//keep a counter
$c = 0;
//loop through the array twice, calculating and comparing results
foreach($arr as $a){
foreach($arr as $b){
if( pow($a[0],$a[1]) * pow($a[2],$a[3]) == pow($b[0],$b[1]) * pow($b[2],$b[3]) ){
$c++;
}
}
}
//print result
echo $c; //64
?>