[go: up one dir, main page]

login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Revision History for A377881 (Bold, blue-underlined text is an addition; faded, red-underlined text is a deletion.)

Showing entries 1-10 | older changes
Number of ordered pairs of real n X n (0,1)-matrices that satisfy the equation A + B = A * B.
(history; published version)
#20 by Alois P. Heinz at Sun Nov 17 12:58:40 EST 2024
STATUS

proposed

approved

#19 by Michel Marcus at Sun Nov 17 12:37:05 EST 2024
STATUS

editing

proposed

#18 by Michel Marcus at Sun Nov 17 12:37:00 EST 2024
LINKS

Stuart E Anderson, <a href="/A377881/a377881_2.cpp.txt">C++ program for NxN solutions</a>

Stuart E Anderson, <a href="/A377881/a377881_2.cpp.txt">C++ program for NxN solutions</a>

STATUS

proposed

editing

#17 by Stuart E Anderson at Fri Nov 15 05:37:58 EST 2024
STATUS

editing

proposed

Discussion
Fri Nov 15
05:52
Stuart E Anderson: That should read; 
41 {3x3 for A>B & A=B} - 10 {3x3  for  A=B} =31 , 
2*31+10 = 72 {3x3 for  (A>B) & (A=B) & (B>A) & (A*B=A+B) }
1909 {4x4  for A>B & A=B} - 58 {4x4 for A=B} =1851 ,
 2*1851+58 = 3760 {4x4  for  (A>B) & (A=B) & (B>A) & (A*B=A+B)}
09:10
Stuart E Anderson: I think I had ordered and unordered confused.
12:17
Andrew Howroyd: these are ordered so the name is correct.
Sat Nov 16
16:56
Stuart E Anderson: Yes
#16 by Stuart E Anderson at Thu Nov 14 22:56:59 EST 2024
LINKS

Stuart E Anderson, <a href="/A377881/a377881_2.cpp.txt">C++ program for 3x3 NxN solutions</a>

Stuart E Anderson, <a href="/A377881/a377881_1.cpp.txt">C++ program for 4x4 solutions</a>

Discussion
Fri Nov 15
05:29
Stuart E Anderson: I've counted ordered pairs.
41 {3x3 A*B=A+B, for A>B, A!=B} - 10 {3x3 A=B} =31 , 2*31+10 = 72 {A*B=A+B}
1909 {4x4 A*B=A+B, for A>B, A!=B} - 58 {4x4 A=B} =1851 , 2*1851+58 = 3760 {A*B=A+B}
If I double my counts for {A>B, A!=B} I get counts for all pairs {A!=B}, if I add the counts for {A=B} in, its equivalent to your counts.
Should the sequence name read 'unordered' rather than ordered?
#15 by Andrew Howroyd at Tue Nov 12 22:42:56 EST 2024
NAME

Number of ordered pairs of real n X n (0,1)-matrices that satisfy the equation A + B = A * B.

EXAMPLE

A x * B = {{0,0,0},{1,2,2},(1,2,2}}

Discussion
Wed Nov 13
15:48
Stuart E Anderson: My code is awful. I agree. I have nearly finished writing a much better program. I hope to have it ready and tested tonight.  I work long shifts in an industry unrelated to maths or computers and I lack a lot of knowledge and training.  Thank you for being patient with me.
18:18
Andrew Howroyd: no worries - its good to have a hobby outside of work! By the time you get to my age you will wonder why you didn't retire sooner.
Thu Nov 14
22:50
Stuart E Anderson: I've written and uploaded my program.   I get terms 1,2,41,1909.  For A == B I have 1,2,10,58.  I havnt looked at your code yet.
#14 by Andrew Howroyd at Tue Nov 12 19:52:51 EST 2024
DATA

1, 1, 2, 72, 24593760, 210042

COMMENTS

If A + B = A * B then (A - I)*(B - I) = I, where I is the identity matrix. For integer matrices, the determinant of (A-I) must be +-1 and its inverse gives B-I. - Andrew Howroyd, Nov 12 2024

PROG

(PARI) \\ See comments. Uses Gray code to generate A-I (called A here).

a(n)= { my(Id=matid(n), A=-Id); sum(f=0, 2^(n^2)-1, if(f, my(t=valuation(f, 2), i=t\n+1, j=t%n+1); A[i, j]=if(i==j, -1, 1)-A[i, j]); if(abs(matdet(A))==1, my(B=A^(-1)+Id); vecmin(B)>=0 && vecmax(B)<=1 && denominator(B)==1)) } \\ Andrew Howroyd, Nov 12 2024

EXTENSIONS

a(4) corrected and a(5) from Andrew Howroyd, Nov 12 2024

Discussion
Tue Nov 12
19:54
Andrew Howroyd: I have added my program.
#13 by Stuart E Anderson at Tue Nov 12 08:38:42 EST 2024
LINKS

Stuart E Anderson, <a href="/A377881/a377881.cpp.txt">C++ program for 3x3 solutions</a>

Stuart E Anderson, <a href="/A377881/a377881_1.cpp.txt">C++ program for 4x4 solutions</a>

STATUS

proposed

editing

Discussion
Tue Nov 12
08:41
Stuart E Anderson: I have added links to the programs for my 3x3 and 4x4 solutions.  My results have the sequence as 1,2,41,1972.  which is still a new sequence.
08:52
Stuart E Anderson: The programs print out all the A B  matrices, their sum|product C, decimals for A B and a list of the unique A B decimals and lastly summary stats.
08:56
Stuart E Anderson: Is it sensible to have a sequence of unordered pairs, and another sequence of ordered pairs?
10:40
Andrew Howroyd: Before looking into unordered pairs, we should address the issue of why I have 3760 solutions. Your C++ program is unreadable and the fact that you have separate programs for a(3) and a(4) is a strong indicator of a bug.
18:40
Stuart E Anderson: ok.  I'll rewrite a single program 
The program is readable in a wide enough monitor.   Can I see how you got 3760?
19:18
Andrew Howroyd: The unreadability is that you have 32 variables and there is no way to be sure you don't have any typos. (nothing to do with monitor width). 
Indeed if you look carefully at the following lines
&&((e+u) == (e*q + f*n + g*y + h*ac))
 &&((f+v) == (e*r + f*o + g*z + h*ad))
&&((g+w) == (e*s + f*m + g*aa + h*ae))
&&((h+x) == (e*t + f*n + g*ab + h*af))

You will see that the multipliers after f are the wrong ones.
19:21
Andrew Howroyd: Should be f*u f*v f*w f*x ?
#12 by Alois P. Heinz at Mon Nov 11 07:24:52 EST 2024
STATUS

editing

proposed

Discussion
Mon Nov 11
18:28
Stuart E Anderson: you're right. It seems Ive counted twice.
19:39
Andrew Howroyd: Can you check your value for a(4)? I get 3760
Tue Nov 12
05:21
Stuart E Anderson: For 4x4 (1,0) matrices I get 1732 unique pairs, with 29 of those A = B
05:45
Stuart E Anderson: I converted the 1,0 matrix pairs to a 16 bit string then converted it to a decimal,
printed the larger of the two numbers of the pair first, kept a count if the numbers were equal, then sorted the list down to unique lines.
07:46
Stuart E Anderson: For 3x3 (1,0) matrices I now have 41 unique pairs, which includes 10 singleton pairs where A = B
08:33
Stuart E Anderson: correction  For 4x4 (1,0) matrices I get 1972 unique pairs, with 29 of those A = B
#11 by Alois P. Heinz at Mon Nov 11 07:24:21 EST 2024
CROSSREFS

Cf. A060757.

STATUS

proposed

editing

Discussion
Mon Nov 11
07:24
Alois P. Heinz: A060757: size of search space ...