Post Reply 
Happy New Year 2024 ... and 2023's last teaser !
01-01-2024, 08:29 PM (This post was last modified: 01-01-2024 08:47 PM by Maximilian Hohmann.)
Post: #13
RE: Happy New Year 2024 ... and 2023's last teaser !
Hello!

For me, the complexity of the task to construct a matrix whose permanent has a given value by far exceeds the task of computing this permanent. As I have no idea at all about how to do it - and have never heard about "permanent" with respect to matrices before either - I asked my friend ChatGPT for help:

You: "Can you please compute a 12x12 matrix whose permanent is xxxx using only 0 and 1 as values"

ChatGTP: "Generating a specific 12x12 matrix with a permanent of xxxx using only 0 and 1 values involves finding an arrangement of elements such that their product sums up to xxxx when considering all possible permutations. The direct calculation of such a matrix might require a lot of computational effort due to the factorial complexity involved.

Let's try a Python script to generate a 12x12 matrix with 0 and 1 values and check its permanent. Note that this approach might not guarantee a solution due to the complexity and exhaustive search required:

Code:

import itertools
import numpy as np

# Function to calculate the permanent of a matrix
def calc_permanent(matrix):
    n = len(matrix)
    perm_sum = 0

    for perm in itertools.permutations(range(n)):
        product = 1
        for i in range(n):
            product *= matrix[i][perm[i]]
        perm_sum += product

    return perm_sum

target_permanent = [b]xxxx[/b]
matrix_size = 12

# Attempt to find a matrix with the specified permanent
found = False
while not found:
    matrix = np.random.randint(2, size=(matrix_size, matrix_size))
    permanent = calc_permanent(matrix)

    if permanent == target_permanent:
        found = True
        print("Matrix found:")
        print(matrix)
        print("Permanent:", permanent)

This Python script attempts to generate random 12x12 matrices consisting of 0s and 1s and calculates their permanents. It continues the process until it finds a matrix whose permanent matches the specified value (xxxx in this case). However, due to the exhaustive search nature of this approach, it might take an extensive amount of time or might not find a suitable matrix within a reasonable timeframe.

If you have specific constraints or additional information that can be used to narrow down the search space, it might help in devising a more targeted approach to finding such a matrix.

<-- end of ChatGPT answer

This must be by far the worst possible method to compute such a matrix and if this is the state of artificial intelligence on 1. January 2024 we will be safe for at least the remaninder of the year from being taken over by machines :-)

Regads
May
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Happy New Year 2024 ... and 2023's last teaser ! - Maximilian Hohmann - 01-01-2024 08:29 PM



User(s) browsing this thread: 1 Guest(s)