This is a base 8 multiplication. A well known French name is the key.
L O T I
R A V I
-----------
* * * * T
L * * * *
* * * * I
O * * * *
-----------------
L * * * E * O T
digs='0123456789';
names='lotirav';
sets=combinator(8,7,'p');
for ii=1:length(sets)
lotirav=sets(ii,:);
for j=1:length(lotirav)
eval([names(j) '=' erase(num2str(lotirav(j)-1),' ') ';']);
end
if l~=0 && r~=0
loti=8^3*l+8^2*o+8*t+i;
ravi=8^3*r+8^2*a+8*v+i;
lxxxexot=dec2base(loti*ravi,8);
if length(lxxxexot)==8
if lxxxexot(1)==num2str(l) ...
&& lxxxexot(7)==num2str(o) ...
&& lxxxexot(8)==num2str(t)
p1=dec2base(i*loti,8);
if length(p1)==5 && str2double(p1(end))==t
p2=dec2base(v*loti,8);
if p2(1)==num2str(l)
p3=dec2base(a*loti,8);
p4=dec2base(r*loti,8);
disp([dec2base(loti,8) ' ' dec2base(ravi,8) ' ' p1 ' ' p2 ' ' p3 ' ' p4])
disp([dec2base(loti*ravi,8) ' ' lxxxexot])
end
end
end
end
end
end
does the multiplication for all possible LOTI and RAVI.
It checks the results to see that the answer of the multiplication has 8 digits, begining with L and ending with OT, and that the first partial product is 5 digits ending in T and that the second partial product begins with L.
The rest of the criteria are left for inspection.
The results:
LOTI RAVI PP1 PP2 PP3 PP4
product product
3604 7214 17020 3604 7410 32234
33252060 33252060
2604 7314 13020 2604 10214 23234
24316460 24316460
5604 7214 27020 5604 13410 50234
51702060 51702060
2604 7514 13020 2604 15624 23234
25057460 25057460
2604 5714 13020 2604 23234 15624
20210460 20210460
5604 7314 27020 5604 21214 50234
52462460 52462460
3604 7514 17020 3604 22624 32234
34573460 34573460
3246 7516 23744 3246 20476 27212
31340224 31340224
While this puzzle was on the queue, the status of the second partial product was in question, and I had been in the middle of developing this program to determine whether a presented 4-digit L * * * should be shifted to the right or whether an additional star should appear to its right.
As seen here, it seems that the second partial product should in fact be 4 digits.
In the partial products the program did not check, the third one does end in I for all the found cases, However, only in the last case does the fourth partial product begin with the letter O, the second digit of LOTI.
Without regard to any French name:
3 2 4 6
7 5 1 6
-----------
2 3 7 4 4
3 2 4 6
2 0 4 7 6
2 7 2 1 2
------------------ French name ??
3 1 3 4 0 2 2 4 L V L T ? O O T
|
Posted by Charlie
on 2024-04-19 14:26:40 |