Warning
This page is located in archive.

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Last revision Both sides next revision
courses:be5b33prg:homeworks:character_equations [2016/01/25 09:34]
xposik created
courses:be5b33prg:homeworks:character_equations [2016/01/25 09:37]
xposik [Introduction]
Line 15: Line 15:
  
 which is a correct mathematical equation. It is also a Python expression which evaluates to ''​True''​. which is a correct mathematical equation. It is also a Python expression which evaluates to ''​True''​.
- 
-**Further requirements for valid solutions:​** 
- 
-  - The solution is a mutually unique assignement of digits and letters. The same letters always represent the same digits, different letters must represent different digits. E.g. if you decide that letter ''​P''​ represents digit ''​6'',​ you have to substitute this digit for all the ''​P''​s in the equation, and also no other letter can represent digit ''​6''​. 
-  - The first letters of all "​words"​ (including single-character "​words"​) cannot represent digit 0, since we usually do not write the initial zeros. 
  
 Another example of character equation may be the following puzzle and its solution: Another example of character equation may be the following puzzle and its solution:
Line 25: Line 20:
   (J + O + I + N + T)**3 == JOINT   (J + O + I + N + T)**3 == JOINT
   (1 + 9 + 6 + 8 + 3)**3 == 19683   (1 + 9 + 6 + 8 + 3)**3 == 19683
 +
 +**Further requirements for valid solutions:​**
 +
 +  - The solution is a mutually unique assignement of digits and letters. The same letters always represent the same digits, different letters must represent different digits. E.g. if you decide that letter ''​P''​ represents digit ''​6'',​ you have to substitute this digit for all the ''​P''​s in the equation, and also no other letter can represent digit ''​6''​.
 +  - The first letters of all "​words"​ (including single-character "​words"​) cannot represent digit 0, since we usually do not write the initial zeros. (In the first example above, neither ''​A'',​ nor ''​B''​ can be 0. In the second example, no character can be zero, since all are part of single-character words.)
  
 Published character equations usually have only a single solution. In general (and in this task in particular),​ this feature is not always fulfilled. We would like to find all possible solutions. Published character equations usually have only a single solution. In general (and in this task in particular),​ this feature is not always fulfilled. We would like to find all possible solutions.
courses/be5b33prg/homeworks/character_equations.txt ยท Last modified: 2016/01/25 09:41 by xposik