Problem 136. Read a Soroban Abacus
Description
The Soroban is the name of the modern Japanese abacus. Information on reading a Soroban can be found here.
![](http://webhome.idirect.com/~totton/abacus/1.gif)
The soroban essentially consists of 7xN slots that 5xN beads may occupy. The input to the function will be a graphical representation of the soroban where true signifies a slot filled with a bead whereas false signifies a vacant slot. You can assume that all inputs will be valid soroban configurations.
Example
input = [ 1 1 0 0 0 0 0 1 1 1 1 0 0 1 1 0 1 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 ]; output = 10586
Solution Stats
Problem Comments
-
5 Comments
Unlike the picture, there are no decimals. The rightmost column is the unit column.
Hi, the abacus is Chinese invention, not japanese !!!
i never made any claim to who invented the abacus. i'm just clarifying that this problem pertains to the japanese soroban, which is specifically designed for base-10 arithmetic.
Link provided to webhome.idirect.com appears to be down. Here is another link:
http://www.alcula.com/soroban.php
nic problem
Solution Comments
Show commentsProblem Recent Solvers226
Suggested Problems
-
3646 Solvers
-
Back to basics 13 - Input variables
265 Solvers
-
Remove white space from the string
192 Solvers
-
Sum of first n positive integers
577 Solvers
-
07 - Common functions and indexing 5
405 Solvers
More from this Author56
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!