2 Digit Multiplication Strategies in Python

4 posts / 0 new
#1 24 August, 2016 - 12:28
Offline
Joined: 2 years 6 months ago

2 Digit Multiplication Strategies in Python

I'm working creating a simple python program for practicing 2by2 multiplication problems. I'm working on making a set of default strategies for each problem. Where multiple strategies can be used, I will rank and select them, but I'm not quite there yet.

The program cycles through the list of problems starting at 1x1, 1x2 ... 2x2 2x3... 99x99. It checks if each strategy can be used, and when it finds one that works it adds that question into the list of questions covered by that strategy. Each other question with no strategy is listed as part of the output in the bottom.

At present I have no special strategy at all for 260 problems, and shortcut strategies that are possible for the other 4790.

Strategy Frequency
unknown 260
squares 100
single digit 1034
ten plus single digit 676
high numbers 28
factor of 10 684
factor of 11 540
ends in 1 476
ends in 2 364
ends in 5 315
ends in 8 266
ends in 9 217
close to 20 6
close to 30 15
close to 40 12
close to 50 18
close to 60 15
close to 70 12
close to 80 12
close to 90 0
[(23, 43), (23, 46), (23, 47), (23, 53), (23, 54), (23, 56), (23, 57), (23, 63), (23, 64), (23, 67), (23, 73), (23, 74), (23, 76), (23, 83), (23, 84), (23, 86), (23, 87), (23, 93), (23, 94), (23, 96), (23, 97), (24, 43), (24, 46), (24, 47), (24, 53), (24, 54), (24, 56), (24, 57), (24, 63), (24, 64), (24, 67), (24, 73), (24, 74), (24, 76), (24, 83), (24, 84), (24, 86), (24, 87), (24, 93), (24, 94), (24, 96), (24, 97), (26, 43), (26, 46), (26, 47), (26, 53), (26, 54), (26, 56), (26, 57), (26, 63), (26, 64), (26, 67), (26, 73), (26, 74), (26, 76), (26, 83), (26, 84), (26, 86), (26, 87), (26, 93), (26, 94), (26, 96), (26, 97), (27, 43), (27, 46), (27, 47), (27, 53), (27, 54), (27, 56), (27, 57), (27, 63), (27, 64), (27, 67), (27, 73), (27, 74), (27, 76), (27, 83), (27, 84), (27, 86), (27, 87), (27, 93), (27, 94), (27, 96), (27, 97), (34, 53), (34, 54), (34, 56), (34, 57), (34, 63), (34, 64), (34, 67), (34, 73), (34, 74), (34, 76), (34, 83), (34, 84), (34, 86), (34, 87), (34, 93), (34, 94), (34, 96), (34, 97), (36, 53), (36, 54), (36, 56), (36, 57), (36, 63), (36, 64), (36, 67), (36, 73), (36, 74), (36, 76), (36, 83), (36, 84), (36, 86), (36, 87), (36, 93), (36, 94), (36, 96), (36, 97), (37, 53), (37, 54), (37, 56), (37, 57), (37, 63), (37, 64), (37, 67), (37, 73), (37, 74), (37, 76), (37, 83), (37, 84), (37, 86), (37, 87), (37, 93), (37, 94), (37, 96), (37, 97), (43, 63), (43, 64), (43, 67), (43, 73), (43, 74), (43, 76), (43, 83), (43, 84), (43, 86), (43, 87), (43, 93), (43, 94), (43, 96), (43, 97), (46, 63), (46, 64), (46, 67), (46, 73), (46, 74), (46, 76), (46, 83), (46, 84), (46, 86), (46, 87), (46, 93), (46, 94), (46, 96), (46, 97), (47, 63), (47, 64), (47, 67), (47, 73), (47, 74), (47, 76), (47, 83), (47, 84), (47, 86), (47, 87), (47, 93), (47, 94), (47, 96), (47, 97), (53, 73), (53, 74), (53, 76), (53, 83), (53, 84), (53, 86), (53, 87), (53, 93), (53, 94), (53, 96), (53, 97), (54, 73), (54, 74), (54, 76), (54, 83), (54, 84), (54, 86), (54, 87), (54, 93), (54, 94), (54, 96), (54, 97), (56, 73), (56, 74), (56, 76), (56, 83), (56, 84), (56, 86), (56, 87), (56, 93), (56, 94), (56, 96), (56, 97), (57, 73), (57, 74), (57, 76), (57, 83), (57, 84), (57, 86), (57, 87), (57, 93), (57, 94), (57, 96), (57, 97), (63, 83), (63, 84), (63, 86), (63, 87), (63, 93), (63, 94), (63, 96), (63, 97), (64, 83), (64, 84), (64, 86), (64, 87), (64, 93), (64, 94), (64, 96), (64, 97), (67, 83), (67, 84), (67, 86), (67, 87), (67, 93), (67, 94), (67, 96), (67, 97), (73, 93), (73, 94), (73, 96), (73, 97), (74, 93), (74, 94), (74, 96), (74, 97), (76, 93), (76, 94), (76, 96), (76, 97)]
total 5050

In any case, I'm looking for a list of all possible strategies that can be used for 2x2 multiplication. If anyone has any thoughts or strategies to share, I'd be very interested.

Cheers,
Mack

edit: (23,57) is possible through difference of squares, but I'm not really sure if this is going to be better than using a left to right method. I think that can be said for alot of the problems on my list, but I'm still searching for completeness. http://mt.artofmemory.com/forums/difference-of-squares-even-faster-multi...

A couple of general strategies are discussed here http://mt.artofmemory.com/forums/the-fastest-and-most-efficient-methods-... .
Posters suggest that there 'is no best strategy,' which may be true. I'm still a noob to all of this and nerding out writing a simple program to teach myself. In any case, I'd like to find and compare all strategies.

24 August, 2016 - 16:02
Offline
Joined: 3 years 3 months ago

I think you need one more layer of abstraction. You want to learn and practice multiple strategies to develop mental agility.

Some days you want to drill a method. Other days method recognition.
Sometimes raw speed other times you want to calculate using 3 methods and a check sum.

The optimal strategy is a stylistic choice depending on the calculator and the objective. Raw speed, accuracy, numeracy, or competition will result in different emphasis on technique and practice (imo).

Of course I could be entirely wrong. It's a journey. I think with 2x2 we all get to the same destination for the most part but how we get there can vary widely.

There are a small subset of 2x2's that we all struggle with. Of course that subset is a little different for each of us. Identifying and removing those weaknesses would likely be very productive.

I tend to waste too much time practicing material I am already effective with.

25 August, 2016 - 09:11
Offline
Joined: 2 years 6 months ago

I want to use python to drill these problems, and provide the option of walkthroughs/answers using multiple strategies for beginners. I want to break up the set of possible problems into problem/default strategy pairs with the option to view alternative strategies for doing a problem. So for now, I'm just researching to see how many strategies I can find before I try and compare them.

26 August, 2016 - 15:12
Offline
Joined: 5 years 9 months ago

Hi mack,

First off, I applaud your endeavor!
Great to do and great to play with.

Quote:
(23,57) is possible through difference of squares, but I'm not really sure if this is going to be better than using a left to right method.

Well, it is better - imho - if you know your squares, by heart.
Let's do this:
23 X 57 = 40^2 - 17^2 = 1600 - 289 = 1311.

However; another method is the anker method;
23 x 57 = 20 X 60 + 3 X 37 = 1200 +111 = 1311.

Another one;
23 x 57 = (20 +3 ) X (60 - 3) = (20 x 60) + (40 x 3) - (3X3) = 1200 + 120 - 9 = 1311.

I don't know which one is better.

Download our free ebook! Just click the "Sign up" button below to create an account, and we'll send you a free ebook with tips on how to get started.