A model for a network of neurons (i.e., nerve cells) inside a brain can mimic a process of associative memory (i.e., associating or matching a given input pattern with a memorized pattern, for example, a photographic image of your parents with their image memorized in your brain.) In this model, this memory process is represented by a process of minimizing the following function:
H = - 1/2 Sumi=1,N Sumj=1,N Jij Si Sj
by varying N variables, S1, S2, S3, ..., and SN.Each variable Si represents the state of the i-th neuron:
Si = +1, if the neuron is excited and firing electrical signals to other neurons,
Si = -1, if the neuron is not excited.
Jij prescribes how the j-th neuron affects the i-th neuron: Jij is roughly proportional to an electrical potential change in the i-th neuron when the j-th neuron is firing electrical signals to the i-th neuron. Jij also satisfies
Jii = 0 and Jij = Jij.
We will assign each Jij one of the following two values:
Jij = +1 or -1.
If the value for each Jij is chosen randomly between these two values, then there may be many ways of assigning values, either +1 or -1, to Si that minimize the above function H.
For this year's Skadron prize, we ask you to come up with a subroutine that finds one of these minimum values. The goal is therefore to find the values of Si that minimize H for values of Jij randomly selected by the main program, which will be provided by the department.
Write a FORTRAN subroutine "minimize.f" (if you prefer to program in C, submit a C function "minimize.c") that must start with the following 2 lines:
subroutine minimize (IS, Jij, N) dimension IS(N), Jij(N,N)
where
IS is an integer array variable whose size is N, the total number of the neurons. IS(i) represents Si and takes a value of either +1 or -1;
Jij is a two-dimensional integer array variable whose size is N by N. Jij(i,j) represents Jij and takes a value of either +1 or -1 (or 0). The values for Jij are randomly assigned by the main program.
For the contest, we will use the following value for N:
N = 200
However, your subroutine should be able to run for any arbitrary value of N.CAUTION: Do not attempt to examine every possible way of assigning values to Si to find the one with the lowest value for H, simply because it will certainly take more than 5 minutes.
To test your subroutine "minimize.f":
cp /home/hmb/skmain02.f skmain02.f
xlf90 -O skmain02.f minimize.f
a.out
To test your C function "minimize.c":
xlc -O skmain02.c minimize.c
a.out
$200 for the first place, $100 for the second place.
Physics majors at ISU.
4:00pm on Tuesday, April 30, 2002.