You are on page 1of 2

CSC2103: Practical activities

Week 2: Algorithms and Sorting algorithms

1. Specifically, you will implement the multiplication Ala Russe (Russian peasant
multiplication) method using your preferred programming language and IDE. You
may use tools such as NetBeans, Eclipse for Java, and Visual Studio for C++.

Ala Russe in python code:

2. Describe how the Japanese multiplication method, also called the Nikolov method,
operates. Detail the algorithm's steps, and if you like, provide code samples using the
programming language of your choice.

The Japanese method of multiplication utilize line using in making multiplication. It


is a visually based method that make the user easier in breaking down larger number
into smaller when it comes to multiplication. This method also involve drawing out
the grid base on the multiplicand and multiplier and calculate the intersection in
between in making out the final result.

The steps involves (With the example of 213 and 132):

1. Draw the lines vertically for the multiplicand and horizontally for the multiplier.
2. The lines should be separated based on their decimal point (e.g. 2 lines on the left,
1 line on the middle and 3 lines on the right, while the multiplier 1 line on the top,
3 lines on the middle and 2 lines on the bottom)
3. After drawing the lines, now we have to calculate the intersection point in
between for the multiplicand and the multiplier.
4. The number of right edge intersecting point will be counted as the ones digit, and
the summation of the diagonal line is going to be the tenth digit, hundred digit
while the number of left edge intersecting point will be the largest value.

Python code in showing Japanese multiplication method:

You might also like