All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Numbers
Permuted Duodecimal Mean Muse (Posted on 2022-12-19) Difficulty: 3 of 5
The following sum is constituted for each permutation p1, p2, p3,..., p9, pA, pB, p10 of the duodecimal (base 12) integers 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, 10:

|p1-p2|+|p3-p4|+|p5-p6|+|p7-p8|+|p9-pA|+|pB-p10|

Determine the average value of all such sums.

See The Solution Submitted by K Sengupta    
Rating: 5.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
re(2): Solution | Comment 4 of 5 |
(In reply to re: Solution by Charlie)

In Python, the itertools library comes included with Python; it is independent of NumPy.  Well, included except that you have to add a line of code to import it.
But you're right, there are many functionalities which I feel should be included without the extra step of "importing" them.

For example there is no "sqrt" or value of pi or trig functions unless you first import math:
import math
x = math.sqrt(16)
y = math.pi
z = math.tan(y/x)

But I've never used Matlab, and I don't think it would be free to me.

btw, after I ran the program I made a spreadsheet of 1 to 12 vs 1 to 12, then averaged the differences adjusting the denominator to not include the main diagonal which was all zeros.

  Posted by Larry on 2022-12-19 13:01:06
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (3)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information