Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Another Parked Gem From (Scientific American) Used For( Coordonation Of Large Masses Of ) People Moving And Manipulation

2 views
Skip to first unread message

stran...@gmail.com

unread,
Jan 14, 2009, 1:31:22 AM1/14/09
to
Please if any data in the files I have has been (edited by trolss in
the version ) i have dissregrad the editing and please tell .


(
Butterfly aka planet taking

http://docs.google.com/Doc?id=dcrqfcdb_4g26w7mfk
http://docs.google.com/Doc?id=dcrqfcdb_6mtjrmcc5
http://docs.google.com/Doc?id=dcrqfcdb_8g7254kfm
http://docs.google.com/Doc?id=dcrqfcdb_10ffw84jcs
http://docs.google.com/Doc?id=dcrqfcdb_12gx8tz7hs
http://docs.google.com/Doc?id=dcrqfcdb_14gcgq38gq

Aditional :
http://www.msn.com/
See the control the / and the meaning .
This is in conjuction with the cahos from same year


)


G

stran...@gmail.com

unread,
Jan 14, 2009, 1:39:41 AM1/14/09
to
On Jan 14, 8:31 am, strange...@gmail.com wrote:
> Please if any data in the files I have has been (edited by trolss in
> the version ) i have dissregrad the editing and please tell .
>
> (
> Butterfly aka planet taking
>
> http://docs.google.com/Doc?id=dcrqfcdb_4g26w7mfkhttp://docs.google.com/Doc?id=dcrqfcdb_6mtjrmcc5http://docs.google.com/Doc?id=dcrqfcdb_8g7254kfmhttp://docs.google.com/Doc?id=dcrqfcdb_10ffw84jcshttp://docs.google.com/Doc?id=dcrqfcdb_12gx8tz7hshttp://docs.google.com/Doc?id=dcrqfcdb_14gcgq38gq

>
> Aditional :http://www.msn.com/
> See the control the / and the meaning .
> This is in conjuction with the cahos from same year
>
> )
>
> G

(

This two are working togheder in the same plan
See simulation results for bellow enigma done by Student Pspice on an
386 pc using mostly ideal op amp models
http://docs.google.com/Doc?id=dcrqfcdb_15czqnrndb
http://docs.google.com/Doc?id=dcrqfcdb_17dp43ntdj
http://docs.google.com/Doc?id=dcrqfcdb_19wn8rkbw5
http://docs.google.com/Doc?id=dcrqfcdb_21tkvrd46j
http://docs.google.com/Doc?id=dcrqfcdb_23fztknqhd

AND THIS INCLUDE AS WELL THE ABOVE GOOGLE


)


G

stran...@gmail.com

unread,
Jan 14, 2009, 1:57:47 AM1/14/09
to
On Jan 14, 8:39 am, strange...@gmail.com wrote:
> On Jan 14, 8:31 am, strange...@gmail.com wrote:
>
> > Please if any data in the files I have has been (edited by trolss in
> > the version ) i have dissregrad the editing and please tell .
>
> > (
> > Butterfly aka planet taking
>
> >http://docs.google.com/Doc?id=dcrqfcdb_4g26w7mfkhttp://docs.google.co...

>
> > Aditional :http://www.msn.com/
> > See the control the / and the meaning .
> > This is in conjuction with the cahos from same year
>
> > )
>
> > G
>
> (
>
> This two are working togheder in the same plan
> See simulation results for bellow enigma done by Student Pspice on an
> 386 pc using mostly ideal op amp modelshttp://docs.google.com/Doc?id=dcrqfcdb_15czqnrndbhttp://docs.google.com/Doc?id=dcrqfcdb_17dp43ntdjhttp://docs.google.com/Doc?id=dcrqfcdb_19wn8rkbw5http://docs.google.com/Doc?id=dcrqfcdb_21tkvrd46jhttp://docs.google.com/Doc?id=dcrqfcdb_23fztknqhd

>
> AND THIS INCLUDE AS WELL THE ABOVE GOOGLE
>
> )
>
> G

I do not have the paper version of this bellow article so please check
its autenticity to the paper version in libraries .
Any way if this is real then the following apply :

(

This contains at least the following
mkultra acknowledgment that chaos was decoded
double double same actions teling no and doing yes an well known
odessa mkultra taktik
this is continuation of the same plan altough knowing it was leaked
and enigma broked
Edipus
holo semites
ack that planet taking atempt will follow
ack to the first butterfly system
self done 9/11

http://docs.google.com/Doc?id=dcrqfcdb_24rxtw9vc3
http://docs.google.com/Doc?id=dcrqfcdb_26c724fgdp
http://docs.google.com/Doc?id=dcrqfcdb_28fhn644c5
http://docs.google.com/Doc?id=dcrqfcdb_30hq427xhg
http://docs.google.com/Doc?id=dcrqfcdb_32cwpsvxdb
http://docs.google.com/Doc?id=dcrqfcdb_34gzb3fbcc
http://docs.google.com/Doc?id=dcrqfcdb_36d85qskd2
http://docs.google.com/Doc?id=dcrqfcdb_38dx6j92fh
http://docs.google.com/Doc?id=dcrqfcdb_40hfrwnzdk
http://docs.google.com/Doc?id=dcrqfcdb_42cr8jhjdb
http://docs.google.com/Doc?id=dcrqfcdb_44hgkqhkfx


)

G

stran...@gmail.com

unread,
Jan 14, 2009, 2:04:42 AM1/14/09
to
On Jan 14, 8:57 am, strange...@gmail.com wrote:
> On Jan 14, 8:39 am, strange...@gmail.com wrote:
>
>
>
>
>
> > On Jan 14, 8:31 am, strange...@gmail.com wrote:
>
> > > Please if any data in the files I have has been (edited by trolss in
> > > the version ) i have dissregrad the editing and please tell .
>
> > > (
> > > Butterfly aka planet taking
>
> > >http://docs.google.com/Doc?id=dcrqfcdb_4g26w7mfkhttp://docs.google.co...
>
> > > Aditional :http://www.msn.com/
> > > See the control the / and the meaning .
> > > This is in conjuction with the cahos from same year
>
> > > )
>
> > > G
>
> > (
>
> > This two are working togheder in the same plan
> > See simulation results for bellow enigma done by Student Pspice on an
> > 386 pc using mostly ideal op amp modelshttp://docs.google.com/Doc?id=dcrqfcdb_15czqnrndbhttp://docs.google.c...

>
> > AND THIS INCLUDE AS WELL THE ABOVE GOOGLE
>
> > )
>
> > G
>
> I do not have the paper version of this bellow article so please check
> its autenticity to the paper version in libraries .
> Any way if this is real then the following apply :
>
> (
>
> This contains at least the following
> mkultra acknowledgment that chaos was decoded
> double double same actions teling no and doing yes an well known
> odessa mkultra taktik
> this is continuation of the same plan altough knowing it was leaked
> and enigma broked
> Edipus
> holo semites
> ack that planet taking atempt will follow
> ack to the first butterfly system
> self done 9/11
>
> http://docs.google.com/Doc?id=dcrqfcdb_15czqnrndbhttp://docs.google.com/Doc?id=dcrqfcdb_17dp43ntdjhttp://docs.google.com/Doc?id=dcrqfcdb_19wn8rkbw5http://docs.google.com/Doc?id=dcrqfcdb_21tkvrd46jhttp://docs.google.com/Doc?id=dcrqfcdb_23fztknqhd
>
> http://docs.google.com/Doc?id=dcrqfcdb_24rxtw9vc3http://docs.google.com/Doc?id=dcrqfcdb_26c724fgdphttp://docs.google.com/Doc?id=dcrqfcdb_28fhn644c5http://docs.google.com/Doc?id=dcrqfcdb_30hq427xhghttp://docs.google.com/Doc?id=dcrqfcdb_32cwpsvxdbhttp://docs.google.com/Doc?id=dcrqfcdb_34gzb3fbcchttp://docs.google.com/Doc?id=dcrqfcdb_36d85qskd2http://docs.google.com/Doc?id=dcrqfcdb_38dx6j92fhhttp://docs.google.com/Doc?id=dcrqfcdb_40hfrwnzdkhttp://docs.google.com/Doc?id=dcrqfcdb_42cr8jhjdbhttp://docs.google.com/Doc?id=dcrqfcdb_44hgkqhkfx
>
> )
>
> G- Hide quoted text -
>
> - Show quoted text -

I do not have the paper version of this bellow article so please
check
its autenticity to the paper version in libraries .
Any way if this is real then the following apply :


(
This is planet taking ww3
http://docs.google.com/Doc?id=dcrqfcdb_45g7jvrv86

http://docs.google.com/Doc?id=dcrqfcdb_47cprb67dx
http://docs.google.com/Doc?id=dcrqfcdb_49gkhp7rg3

)


G

stran...@gmail.com

unread,
Jan 14, 2009, 2:07:43 AM1/14/09
to
> >http://docs.google.com/Doc?id=dcrqfcdb_15czqnrndbhttp://docs.google.c...
>
> >http://docs.google.com/Doc?id=dcrqfcdb_24rxtw9vc3http://docs.google.c...

>
> > )
>
> > G- Hide quoted text -
>
> > - Show quoted text -
>
>  I do not have the paper version of this bellow article so please
> check
>  its autenticity to the paper version in libraries .
>  Any way if this is real then the following apply :
>
> (
> This is planet taking ww3http://docs.google.com/Doc?id=dcrqfcdb_45g7jvrv86
>
> http://docs.google.com/Doc?id=dcrqfcdb_47cprb67dxhttp://docs.google.com/Doc?id=dcrqfcdb_49gkhp7rg3
>
> )
>
> G- Hide quoted text -
>
> - Show quoted text -

And of course this :
http://groups.google.com/group/soc.culture.scientists/browse_thread/thread/dae0fd65425e609d?hl=en#
http://spreadsheets.google.com/pub?key=pbtTpZyml7e6gf9W8N2fLZw

G

stran...@gmail.com

unread,
Jan 14, 2009, 3:26:19 AM1/14/09
to
On Jan 14, 8:31 am, strange...@gmail.com wrote:
> Please if any data in the files I have has been (edited by trolss in
> the version ) i have dissregrad the editing and please tell .
>
> (
> Butterfly aka planet taking
>
> http://docs.google.com/Doc?id=dcrqfcdb_4g26w7mfkhttp://docs.google.com/Doc?id=dcrqfcdb_6mtjrmcc5http://docs.google.com/Doc?id=dcrqfcdb_8g7254kfmhttp://docs.google.com/Doc?id=dcrqfcdb_10ffw84jcshttp://docs.google.com/Doc?id=dcrqfcdb_12gx8tz7hshttp://docs.google.com/Doc?id=dcrqfcdb_14gcgq38gq

>
> Aditional :http://www.msn.com/
> See the control the / and the meaning .
> This is in conjuction with the cahos from same year
>
> )
>
> G

(

Analysis and Simulation of Chaotic Systems (Applied Mathematical
Sciences) (Hardcover)
by Frank C. Hoppensteadt (Author)

)


G

stran...@gmail.com

unread,
Jan 14, 2009, 3:49:16 AM1/14/09
to
On Jan 14, 10:26 am, strange...@gmail.com wrote:
> On Jan 14, 8:31 am, strange...@gmail.com wrote:
>
> > Please if any data in the files I have has been (edited by trolss in
> > the version ) i have dissregrad the editing and please tell .
>
> > (
> > Butterfly aka planet taking
>
> >http://docs.google.com/Doc?id=dcrqfcdb_4g26w7mfkhttp://docs.google.co...

>
> > Aditional :http://www.msn.com/
> > See the control the / and the meaning .
> > This is in conjuction with the cahos from same year
>
> > )
>
> > G
>
> (
>
> Analysis and Simulation of Chaotic Systems (Applied Mathematical
> Sciences) (Hardcover)
> by Frank C. Hoppensteadt (Author)
>
> )
>
> G

I do not have the paper version of this bellow article so please
check
its autenticity to the paper version in libraries .
Any way if this is real then the following apply :

(

Chaos meteorite google // tricc of a tail forth reich

http://docs.google.com/Doc?id=dcrqfcdb_50c28rxkgj
http://docs.google.com/Doc?id=dcrqfcdb_52hjhmhtzw


)


G

stran...@gmail.com

unread,
Jan 14, 2009, 3:58:19 AM1/14/09
to
> >http://docs.google.com/Doc?id=dcrqfcdb_47cprb67dxhttp://docs.google.c...

>
> > )
>
> > G- Hide quoted text -
>
> > - Show quoted text -
>
> And of course this :http://groups.google.com/group/soc.culture.scientists/browse_thread/t...http://spreadsheets.google.com/pub?key=pbtTpZyml7e6gf9W8N2fLZw

>
> G- Hide quoted text -
>
> - Show quoted text -

I do not have the paper version of this bellow article so please
check
its autenticity to the paper version in libraries .
Any way if this is real then the following apply :

(
Planet taking in double meaning making 21 to the left up corner
Forth Reich
Holo Semites
rf system planetary level and probably rf as single planetary control
tool post planet taking
etc
http://docs.google.com/Doc?id=dcrqfcdb_53g2vgs3hm
http://docs.google.com/Doc?id=dcrqfcdb_55d9fwq6f7
http://docs.google.com/Doc?id=dcrqfcdb_5776p547dz
)


G

stran...@gmail.com

unread,
Jan 14, 2009, 4:17:54 AM1/14/09
to
> > G- Hide quoted text -
>
> > - Show quoted text -
>
>  I do not have the paper version of this bellow article so please
> check
>  its autenticity to the paper version in libraries .
>  Any way if this is real then the following apply :
>
> (
> Planet taking in double meaning making 21 to the left up corner
> Forth Reich
> Holo Semites
> rf system planetary level and probably rf as single planetary control
> tool post planet taking
> etchttp://docs.google.com/Doc?id=dcrqfcdb_53g2vgs3hmhttp://docs.google.com/Doc?id=dcrqfcdb_55d9fwq6f7http://docs.google.com/Doc?id=dcrqfcdb_5776p547dz
> )
>
> G- Hide quoted text -
>
> - Show quoted text -

I do not have the paper version of this bellow article so please
check
its autenticity to the paper version in libraries .
Any way if this is real then the following apply :

(

Since it is an later (and probable atempts to hide the data allready
for once and continue in the same time ) pice of art work it encoded
in an overwelming level of sofistication and meanings having
probably several meaning to several peoples according to their
predefinition
It contains most above data and related and has very exotic parked
dimensions and meanings all in the same time
its place is here any way

http://docs.google.com/Doc?id=dcrqfcdb_5847prv7f9
http://docs.google.com/Doc?id=dcrqfcdb_60f9hw2scp
)


G

mandelbr...@gmail.com

unread,
Jan 14, 2009, 10:06:18 AM1/14/09
to
> > etchttp://docs.google.com/Doc?id=dcrqfcdb_53g2vgs3hmhttp://docs.google.c...

> > )
>
> > G- Hide quoted text -
>
> > - Show quoted text -
>
> I do not have the paper version of this bellow article so please
> check
>  its autenticity to the paper version in libraries .
>  Any way if this is real then the following apply :
>
> (
>
> Since it is an later  (and probable atempts to hide the data allready
> for once and continue in the same time ) pice of art work it encoded
> in an overwelming level of sofistication and meanings having
> probably several meaning to several peoples according to their
> predefinition
> It contains most above data and related and has very exotic parked
> dimensions and meanings all in the same time
> its place is here any way
>
> http://docs.google.com/Doc?id=dcrqfcdb_5847prv7f9http://docs.google.com/Doc?id=dcrqfcdb_60f9hw2scp
> )
>
> G- Hide quoted text -
>
> - Show quoted text -

(

Cost: $0-100
About These Ratings Difficulty: Danger 1: (No Hazards) Utility:

------------------------

Algorithm of the Gods


---------------------

by Shawn Carlson
March, 1997

---------------------

I USED TO SPEND MY days (and I do mean my days) hunting for
supernovae. The astrophysics group I worked for dusted off an old 30-
inch telescope, then used only for teaching, and converted it into a
fully automated research instrument. When night arrived, this computer-
controlled marvel woke up, checked its systems and set about the
business of discovery. On clear nights it scanned hundreds of
galaxies, searching for objects that appeared as bright stars not
detected in earlier images. Sometimes it found them.


Figure 1: GALAXY SEARCH was made possible by a heavenly algolrithm
It was wonderful! And I didn't feel too guilty about not freezing all
night in a remote observatory. I had toiled in cyberhell for months
teaching the telescope's computer how to decide which galaxies to
image and in what order it should observe them. Because large
excursions from horizon to horizon sent the telescope's 40-year-old
drive system into shock, it was vital that the feeble old veteran be
moved as little as possible. That meant ordering the galaxies into a
sequence that, totaled over the whole night, required the telescope to
move through the smallest possible angle. Computer aficionados will
recognize my galaxy conundrum as a variant of the classic traveling
salesman problem, in which a huckster seeks an itinerary that will let
him travel the smallest possible distance through a list of cities.

The problem of minimizing the telescope's motion appeared intractable.
There are nearly 10375 different ways to sort 200 galaxies-a fairly
typical evening's caseload for our telescope. (For you math types,
10375 is 200 factorial.) To find the one way of ordering the galaxies
for a search that put the absolute least strain on the telescope, we
would have had to check every possible ordering. Unfortunately, this
job could not be accomplished even by all the world's supercomputers
working day and night for sextillions of years.

For most real-world problems, a solution that comes within a few
percent of the ideal one is quite acceptable. Fortunately, computer
scientists have devised an algorithm that can find such solutions to
many seemingly impossible problems. This amazing algorithm enables
ordinary laptop computers to come up with these solutions in just a
few minutes, making it a powerful addition to any amateur scientist's
tool kit.

Called simulated annealing, this algorithm is a remarkable melding of
human cleverness and natural efficiency. A mathematical physicist
named Nicholas Metropolis and his co-workers developed the procedure
back in 1953, but it has only recently come into wide use.
Metropolis's procedure was later used to find useful solutions to
traveling-salesman-type problems by mimicking on a computer the
natural process by which the crystal lattices of glass or metal relax
when heated. This process is called annealing.

Although the procedure is modeled on annealing, the relevant
fundamentals are the same, and perhaps a bit more easily explained,
for crystal growth. The molecules in a solution of hot sugar water
wander about randomly. If the temperature drops quickly, the sugar
molecules solidify into a complicated jumble. But if the temperature
drops slowly, they form a highly ordered crystal that can be billions
of times larger than the individual molecules.

With each molecule not only immobile but also at its lowest possible
energy level in the crystal's lattice, this crystal is in its minimum
energy state. (It corresponds, in my problem, to the galaxy ordering
that demands the least movement from the telescope.) The system
naturally progresses toward this minimum in a rather unexpected and
remarkable way. The molecules are naturally distributed over a range
of kinetic energies. As the temperature cools, the average kinetic
energy drops. But some individual molecules remain in high-energy
states, even when most are moving slow enough to bind to the crystal.
When the lower-energy molecules get "hung up," they often bind in
states with excess energy rather than in the lowest-energy states
where they belong.

The higher-energy molecules, however, can "knock" these trapped
molecules out of these overly energetic bound states and into states
of lower energy. This energy transference from molecule to molecule
allows the molecules to redistribute themselves as the fluid cools,
thereby nudging the growing edges of the crystal in such a way that
the molecules settling into them can find the minimum energy state.
This orderly crystal growth occurs only during a slow cooling because
a lot of time is needed for the molecules to find the lowest-energy
state.

So what does all this have to do with the traveling salesman problem?
To use Metropolis's procedure, you must be able to describe your
problem as a search for a sequence. In the traveling salesman problem,
for example, the problem is to determine the best order in which to
visit the cities on a list. With a little cleverness, a great many
problems can be formulated in this way. It is also necessary for you
to be able to generate a number that tells how well any given sequence
works; the better the solution, the smaller this number must be. This
number is analogous to the energy of the crystal in the crystal-growth
example. For my supernovae search problem, the sequence was the order
of galaxies searched; the quantity analogous to energy was the total
angle through which the telescope had to move.

The box outlines the algorithm. It works by calculating the energy
levels represented by different sequences, or "paths." If a new
sequence has a lower energy than the previous one, the program always
adopts it. Returning to the crystal-growth example, a lower-energy
path corresponds to one or more molecules finding their way into a
position of lower energy in the lattice. But what about a higher-
energy path? Here is where it gets interesting. The program does not
immediately reject higher-energy paths; after all, the dislodging of a
molecule trapped in a higher-energy state in a lattice is an example
of a higher-energy path, and such occurrences are the heart of the
procedure.

Yet not all higher-energy paths are likely to nudge the system into a
lower-energy state. To determine which ones do, the procedure uses the
so-called Boltzmann probability distribution. This factor determines
the probability of finding a system, such as a molecule or a group of
molecules, with a certain energy E at a given temperature T. When
applied to simulated annealing, this probability turns out to be the
number e (a constant, equal to about 2.7183, that comes up often in
physics and other fields) raised to the power (-E/kT), where k is
Boltzmann's constant, which relates temperature to energy, andE is the
energy difference between the two paths. A clever trick allows the
list to be altered without requiring the energy to be recalculated
from scratch every time. The alteration begins by randomly selecting
some subsection of the list. Then, either the order of the
subsection's elements is reversed, or the subsection is moved and
reinserted somewhere else in the list at random. In either case, the
energy associated with the subsection does not change. The energy
changes only where the subsection joins the rest of the list.

Simulated annealing isn't the only algorithm that mimics nature to
solve complex problems. So-called genetic algorithms simulate
evolution at the genetic level to create cyberorganisms that are
themselves solutions to research problems [see "The Amateur
Scientist," July 1992]. Neural networks-which simulate the activity of
neurons in the brain to store information, learn from experience and
do calculations-are another field of intense research.

All this brings up a fascinating point. Nature is far more clever than
humans will ever be. Simulating on a computer nature's methods of
organizing and creating has already produced extraordinarily powerful
tools to fell some of our own most vexing computing problems. Despite
this, only a handful of nature's solutions have yet been duplicated on
a computer. There simply have to be more out there to borrow from. The
tricky part is in recognizing which systems to model and in realizing
the kinds of problems that our simulations can solve.

So keep your eyes open! Perhaps, while contemplating ripples of
turbulence in cigarette smoke, investigating how individual bees
organize themselves into a hive or studying the simultaneous turns of
a flock of birds, you will discover the next major innovation in
computer problem solving.

Source Code for the
Annealing Algorithm


amsci_anneal.c

amsci_anneal2.c

To download all the C code you'll need to implement the simulated
annealing algorithm, visit the Society for Amateur Scientists's World
Wide Web site. For more information about other amateur scientist
projects, visit the Web site or call 1-401-823-7800.


Suppliers and Organizations

The Society for Amateur Scientists (SAS) is a nonprofit research and
educational organization dedicated to helping people enrich their
lives by following their passion to take part in scientific adventures
of all kinds.

The Society for Amateur Scientists
5600 Post Road, #114-341
East Greenwich, RI 02818
Phone: 1-401-823-7800

Internet: http://www.sas.org/

American Science & Surplus offers a unique mix of industrial, military
and educational items, with an emphasis on science and education. We
supply a wide range of unusual and hard to find items (some say
bizarre stuff) to the hobbyist, tinkerer, artist, experimenter, home
educator, do-it-yourselfer, and bargain hunter.

American Science & Surplus
P.O. Box 1030
Skokie, IL 60076
847-982-0870 Voice
800-934-0722 Fax


in...@sciplus.com

http://www.sciplus.com

#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>

#define TEMP_FACTOR 0.9
#define YES 1
#define NO 0
#define REVERSE 1
#define TRANSPOSE 0
#define NUMLISTITEMS 200 /* Num items on the list. YOU MAY NEED TO
CHANGE THIS NUMBER TO SUIT YOUR APPLICATION. */

#define ALEN(a,b,c,d) sqrt(((b)-(a))*((b)-(a))+((d)-(c))*((d)-(c)))

struct ListElement
{
/*DEFINE YOUR DATA STRUCTURE HERE. WE'VE ASSUMED SOMETHING
LISTED IN CARTESIAN COORDINATES. IF YOU'RE DATA IS NOT IN
THESE COORDINATES, YOU WILL NEED TO MODIFY THIS STRUCTURE
AND ALSO MAKE THE NECESSARY CHANGES IN THE ENERGY FUNCTION. */

float x;
float y;
};

int CHECKBEST = NO;
float BESTENERGY;
struct ListElement **bestList;


main()
{ struct ListElement **list;
int runLimit, sucLimit, numListItems, i, numSuc;
int Anneal();
float temperature, energy;
struct ListElement **setup();
FILE *outFile, *energyFile;
void printList();

float GetEnergy(), ener;

numListItems = NUMLISTITEMS;

list = setup(&energy, &temperature, &runLimit, &sucLimit,
numListItems);

outFile = fopen("InitList200.dat","w");
printList(outFile,list, numListItems);
fclose(outFile);

energyFile = fopen("energy.dat", "w");
fprintf(energyFile,"Temp\tEnergy\tnumSuc\n");

for(i = 1; i < numListItems; i++)
{
numSuc = Anneal(list, numListItems, runLimit, temperature, sucLimit,
numListItems);
ener = GetEnergy(list,numListItems);

printf("%f\t%f\t%d\n",temperature,ener,numSuc);
fprintf(energyFile,"%f\t%f\t%d\n",temperature,ener,numSuc);

if(numSuc <= runLimit*0.02 && CHECKBEST == NO) { /* Start checking
for the best solution?*/
CHECKBEST = YES;
BESTENERGY = ener;
}

if(numSuc == 0) break;

temperature *= TEMP_FACTOR;
}

fclose(energyFile);

outFile = fopen("FinalList200.dat","w");
printList(outFile,list, numListItems);
fclose(outFile);

outFile = fopen("BestList200.dat","w");
printList(outFile,bestList,numListItems);
fclose(outFile);

outFile = fopen("lowestEnergy.dat","w");
fprintf(outFile,"Lowest Energy = %f\n", BESTENERGY); /* Store energy.
*/
fclose(outFile);


}


void printList(outFile,list, numListItems)
FILE *outFile;
struct ListElement **list;
int numListItems;
{
int i;

for(i=0; i< numListItems; i++)
fprintf(outFile,"%f\t%f\n",list[i]->x,list[i]->y);


}


struct ListElement **setup(energy, temperature, runLimit, sucLimit,
numListItems)

int *runLimit, *sucLimit, numListItems;
float *temperature, *energy;
{ struct ListElement **CreateInitialList(), **list;
float GetEnergy();

list = CreateInitialList(numListItems);
*energy = GetEnergy(list, numListItems);
*temperature = *energy/numListItems;
*runLimit = 100 * numListItems;
*sucLimit = 10 * numListItems;

return list;
}

struct ListElement **CreateInitialList(numListItems)
int numListItems;
{ int i;
struct ListElement **list;
void InitializeElement();

/* Allocate memory for the array of pointers. */
list = (struct ListElement **)malloc(sizeof(struct ListElement *) *
numListItems);
bestList = (struct ListElement **)malloc(sizeof(struct ListElement *)
* numListItems);

/* Create the data structures and install pointers to them into the
list. */
for(i = 0; i < numListItems; i++)
list[i] = (struct ListElement *)malloc(sizeof(struct ListElement));

for(i = 0; i < numListItems; i++) /* Set initial values. */
InitializeElement(list[i]);

return list;
}

void InitializeElement(element)
struct ListElement *element;
{
/* NOTE: YOU WILL HAVE TO CHANGE THIS FUNCTION. THIS FUNCTION
SETS THE INITIAL VALUES IN THE DATA STRUCTURE. HERE WE JUST
SET THE COORDINATES TO NUMBERS BETWEEN ZERO AND 100. */

element->x = (float)rand()/RAND_MAX * 100;
element->y = (float)rand()/RAND_MAX * 100;
}


float GetEnergy(list, numListItems)
struct ListElement **list;
int numListItems;
{ int i;
float ener, energy();

for(ener = 0, i = 0; i < numListItems - 1; i++)
ener += energy(list, i, i+1);

return ener;
}

/* THIS FUNCTION CARRIES OUT THE ANNEALING PROCEDURE. */

int Anneal(list, listSize, runLimit, temperature, sucLimit,
numListItems)
struct ListElement **list;
int listSize, runLimit, sucLimit, numListItems;
float temperature;
{
int numSuc, start, end, insertPoint, alteration, answer, i, j;
int Oracle(), PickAlteration();
float Ediff, EnergyDif();
void GetSegment(), AlterList();
FILE *bestFile;

float GetEnergy(), ener;

numSuc = 0;

for(i = 0; i < runLimit; i++){
GetSegment(&start, &end, &insertPoint, numListItems);

alteration = PickAlteration();
Ediff = EnergyDif(list, start, end, insertPoint, numListItems,
alteration);


if(Oracle(Ediff, temperature) == YES){
AlterList(list,start,end, insertPoint, alteration, numListItems);
numSuc++;
if(CHECKBEST == YES) {
ener = GetEnergy(list,numListItems);
if(ener < BESTENERGY) { /* Save best list. */
BESTENERGY = ener;
for(j = 0; j < numListItems; j++) bestList[j] = list[j];
}
}
}

if(numSuc >= sucLimit) break;

}

return numSuc;
}


/* THIS FUNCTION DECIDES IF A NEW PATH SHOULD BE KEPT. */

int Oracle(Edif, temperature)
float Edif, temperature;
{

if(Edif < 0.0 || exp(-Edif/temperature) > (double)rand()/RAND_MAX)
return YES;

return NO;
}


/* THIS FUNCTION DECIDES WHETHER TO TRY REVERSING THE PATH OR
TRANSPOSING IT. */

int PickAlteration(void)
{
if((float)rand()/RAND_MAX < 0.5) return REVERSE;

return TRANSPOSE;
}


/* THIS FUNCTION SELECTS A SEGMENT FOR POSSIBLE ALTERATION. */
void GetSegment(start, end, insertPoint, listSize)
int *start, *end, *insertPoint, listSize;
{ int shuffle[3], done = NO, i, j, hold;

do{ /* Select three different numbers between 0 and listSize - 1 */
for(i = 0; i <3; i++)
shuffle[i] = (int)(((float)rand()/RAND_MAX)*(listSize - 1));

if(shuffle[0] == shuffle[1] || /* Make sure no two are the same.
*/
shuffle[0] == shuffle[2] ||
shuffle[1] == shuffle[2]) ;
else done = YES;

}while(done == NO);


/* Sort these numbers. */

for(i = 0; i < 3; i++){
for(j = i + 1; j < 3; j++){
if(shuffle[i] > shuffle[j]){
hold = shuffle[i];
shuffle[i] = shuffle[j];
shuffle[j] = hold;
}
}
}

/* Decide whether to set the insertPoint above or below the block to
be altered. */

if((float)rand()/RAND_MAX < 0.5 || shuffle[2] - 1 == shuffle[1]){
*insertPoint = shuffle[0];
*start = shuffle[1];
*end = shuffle[2];
}
else{
*start = shuffle[0];
*end = shuffle[1];
*insertPoint = shuffle[2];
}
}


float EnergyDif(list, start, end, insertPoint, listSize, alteration)
struct ListElement **list;
int start, end, insertPoint, alteration;
{
float trans_cost(), reverse_cost();

switch(alteration){
case TRANSPOSE:
return trans_cost(list,start,end,insertPoint,listSize);

case REVERSE:
return reverse_cost(list,start,end,listSize);
}

}


float trans_cost(list,start,end,insertPoint,listSize)
struct ListElement **list;
int start, end, insertPoint, listSize;
{ float cost, energy();

cost = 0;
/* Break the current connections. */

if(start > 0) cost -= energy(list, start-1, start);
if(end < listSize - 1) cost -= energy(list, end, end+1);
if(insertPoint > 0) cost -= energy(list,insertPoint, insertPoint -1);

/* Build the new connections. */

cost += energy(list, insertPoint , end);
if(insertPoint - 1 >= 0 ) cost += energy(list,insertPoint - 1,
start);
if(start > 0 && end < listSize - 1 )
cost += energy(list, start - 1, end + 1);

return cost/listSize;
}

float reverse_cost(list,start,end,listSize)
struct ListElement **list;
int start, end, listSize;
{ float cost, energy();

cost = 0;

/*Subtract the old cost. */

if(start > 0) cost -= energy(list, start - 1, start);
if(end < listSize- 1) cost -= energy(list,end,end+1);


/* Add the new cost. */

if(start > 0) cost += energy(list,start - 1, end);
if(end < listSize-1) cost += energy(list,start,end+1);

return cost/listSize;

}


float energy(list, v1, v2)
struct ListElement **list;
int v1, v2;
{
/* YOU MUST CHANGE THIS FUNCTION TO CALCULATE THE
THE "ENERGY" BETWEEN TWO ELEMENTS IN YOUR LIST. HERE WE
JUST CALCULATE THE PATH LENGTH BETWEEN TWO POINTS ON A PLANE*/

return (float)ALEN(list[v1]->x,list[v2]->x,list[v1]->y,list[v2]->y);

}


void AlterList(list, start, end, insertPoint, alteration, listSize)
struct ListElement **list;
int start, end, insertPoint, alteration;
{ struct ListElement *holder, **dumList;
int i, j;

switch(alteration)
{ case REVERSE:
for(i = start, j = end; i < j; i++, j--){
holder = list[i];
list[i] = list[j];
list[j] = holder;
}
return;


case TRANSPOSE:
dumList = (struct ListElement **)malloc(sizeof(struct ListElment *)
*listSize);

for(j = 0, i = start; i <= end; i++, j++) /* Copy group. */
dumList[j] = list[i];

if(insertPoint > end){ /* Move downward. */
for(j=end+1, i = start; j < insertPoint; i++, j++)
list[i] = list[j];

for(j = insertPoint - (end - start + 1), i = 0; j < insertPoint;
i++, j++)
list[j] = dumList[i]; /* Reinstall group. */
}
else {
for(j=start - 1, i = end; j >= insertPoint; i--, j--)
list[i] = list[j]; /* Move upward. */

for(j = insertPoint, i = 0; i <= (end - start); i++, j++)
list[j] = dumList[i];

}

free(dumList);

return;
}


}


#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>

#define TEMP_FACTOR 0.9
#define YES 1
#define NO 0
#define REVERSE 1
#define TRANSPOSE 0
#define NUMLISTITEMS 200 /* Num items on the list. YOU MAY NEED TO
CHANGE THIS NUMBER TO SUIT YOUR APPLICATION. */

#define ALEN(a,b,c,d) sqrt(((b)-(a))*((b)-(a))+((d)-(c))*((d)-(c)))

struct ListElement
{
/*DEFINE YOUR DATA STRUCTURE HERE. WE'VE ASSUMED SOMETHING
LISTED IN CARTESIAN COORDINATES. IF YOU'RE DATA IS NOT IN
THESE COORDINATES, YOU WILL NEED TO MODIFY THIS STRUCTURE
AND ALSO MAKE THE NECESSARY CHANGES IN THE ENERGY FUNCTION. */

float x;
float y;
};

int CHECKBEST = NO;
float BESTENERGY;
struct ListElement **bestList;


main()
{ struct ListElement **list;
int runLimit, sucLimit, numListItems, i, numSuc;
int Anneal();
float temperature, energy;
struct ListElement **setup();
FILE *outFile, *energyFile;
void printList();

float GetEnergy(), ener;

numListItems = NUMLISTITEMS;

list = setup(&energy, &temperature, &runLimit, &sucLimit,
numListItems);

outFile = fopen("InitList200.dat","w");
printList(outFile,list, numListItems);
fclose(outFile);

energyFile = fopen("energy.dat", "w");
fprintf(energyFile,"Temp\tEnergy\tnumSuc\n");

for(i = 1; i < numListItems; i++)
{
numSuc = Anneal(list, numListItems, runLimit, temperature, sucLimit,
numListItems);
ener = GetEnergy(list,numListItems);

printf("%f\t%f\t%d\n",temperature,ener,numSuc);
fprintf(energyFile,"%f\t%f\t%d\n",temperature,ener,numSuc);

if(numSuc <= runLimit*0.02 && CHECKBEST == NO) { /* Start checking
for the best solution?*/
CHECKBEST = YES;
BESTENERGY = ener;
}

if(numSuc == 0) break;

temperature *= TEMP_FACTOR;
}

fclose(energyFile);

outFile = fopen("FinalList200.dat","w");
printList(outFile,list, numListItems);
fclose(outFile);

outFile = fopen("BestList200.dat","w");
printList(outFile,bestList,numListItems);
fclose(outFile);

outFile = fopen("lowestEnergy.dat","w");
fprintf(outFile,"Lowest Energy = %f\n", BESTENERGY); /* Store energy.
*/
fclose(outFile);


}


void printList(outFile,list, numListItems)
FILE *outFile;
struct ListElement **list;
int numListItems;
{
int i;

for(i=0; i< numListItems; i++)
fprintf(outFile,"%f\t%f\n",list[i]->x,list[i]->y);


}


struct ListElement **setup(energy, temperature, runLimit, sucLimit,
numListItems)

int *runLimit, *sucLimit, numListItems;
float *temperature, *energy;
{ struct ListElement **CreateInitialList(), **list;
float GetEnergy();

list = CreateInitialList(numListItems);
*energy = GetEnergy(list, numListItems);
*temperature = *energy/numListItems;
*runLimit = 100 * numListItems;
*sucLimit = 10 * numListItems;

return list;
}

struct ListElement **CreateInitialList(numListItems)
int numListItems;
{ int i;
struct ListElement **list;
void InitializeElement();

/* Allocate memory for the array of pointers. */
list = (struct ListElement **)malloc(sizeof(struct ListElement *) *
numListItems);
bestList = (struct ListElement **)malloc(sizeof(struct ListElement *)
* numListItems);

/* Create the data structures and install pointers to them into the
list. */
for(i = 0; i < numListItems; i++)
list[i] = (struct ListElement *)malloc(sizeof(struct ListElement));

for(i = 0; i < numListItems; i++) /* Set initial values. */
InitializeElement(list[i]);

return list;
}

void InitializeElement(element)
struct ListElement *element;
{
/* NOTE: YOU WILL HAVE TO CHANGE THIS FUNCTION. THIS FUNCTION
SETS THE INITIAL VALUES IN THE DATA STRUCTURE. HERE WE JUST
SET THE COORDINATES TO NUMBERS BETWEEN ZERO AND 100. */

element->x = (float)rand()/RAND_MAX * 100;
element->y = (float)rand()/RAND_MAX * 100;
}


float GetEnergy(list, numListItems)
struct ListElement **list;
int numListItems;
{ int i;
float ener, energy();

for(ener = 0, i = 0; i < numListItems - 1; i++)
ener += energy(list, i, i+1);

return ener;
}

/* THIS FUNCTION CARRIES OUT THE ANNEALING PROCEDURE. */

int Anneal(list, listSize, runLimit, temperature, sucLimit,
numListItems)
struct ListElement **list;
int listSize, runLimit, sucLimit, numListItems;
float temperature;
{
int numSuc, start, end, insertPoint, alteration, answer, i, j;
int Oracle(), PickAlteration();
float Ediff, EnergyDif();
void GetSegment(), AlterList();
FILE *bestFile;

float GetEnergy(), ener;

numSuc = 0;

for(i = 0; i < runLimit; i++){
GetSegment(&start, &end, &insertPoint, numListItems);

alteration = PickAlteration();
Ediff = EnergyDif(list, start, end, insertPoint, numListItems,
alteration);


if(Oracle(Ediff, temperature) == YES){
AlterList(list,start,end, insertPoint, alteration, numListItems);
numSuc++;
if(CHECKBEST == YES) {
ener = GetEnergy(list,numListItems);
if(ener < BESTENERGY) { /* Save best list. */
BESTENERGY = ener;
for(j = 0; j < numListItems; j++) bestList[j] = list[j];
}
}
}

if(numSuc >= sucLimit) break;

}

return numSuc;
}


/* THIS FUNCTION DECIDES IF A NEW PATH SHOULD BE KEPT. */

int Oracle(Edif, temperature)
float Edif, temperature;
{

if(Edif < 0.0 || exp(-Edif/temperature) > (double)rand()/RAND_MAX)
return YES;

return NO;
}


/* THIS FUNCTION DECIDES WHETHER TO TRY REVERSING THE PATH OR
TRANSPOSING IT. */

int PickAlteration(void)
{
if((float)rand()/RAND_MAX < 0.5) return REVERSE;

return TRANSPOSE;
}


/* THIS FUNCTION SELECTS A SEGMENT FOR POSSIBLE ALTERATION. */
void GetSegment(start, end, insertPoint, listSize)
int *start, *end, *insertPoint, listSize;
{ int shuffle[3], done = NO, i, j, hold;

do{ /* Select three different numbers between 0 and listSize - 1 */
for(i = 0; i <3; i++)
shuffle[i] = (int)(((float)rand()/RAND_MAX)*(listSize - 1));

if(shuffle[0] == shuffle[1] || /* Make sure no two are the same.
*/
shuffle[0] == shuffle[2] ||
shuffle[1] == shuffle[2]) ;
else done = YES;

}while(done == NO);


/* Sort these numbers. */

for(i = 0; i < 3; i++){
for(j = i + 1; j < 3; j++){
if(shuffle[i] > shuffle[j]){
hold = shuffle[i];
shuffle[i] = shuffle[j];
shuffle[j] = hold;
}
}
}

/* Decide whether to set the insertPoint above or below the block to
be altered. */

if((float)rand()/RAND_MAX < 0.5 || shuffle[2] - 1 == shuffle[1]){
*insertPoint = shuffle[0];
*start = shuffle[1];
*end = shuffle[2];
}
else{
*start = shuffle[0];
*end = shuffle[1];
*insertPoint = shuffle[2];
}
}


float EnergyDif(list, start, end, insertPoint, listSize, alteration)
struct ListElement **list;
int start, end, insertPoint, alteration;
{
float trans_cost(), reverse_cost();

switch(alteration){
case TRANSPOSE:
return trans_cost(list,start,end,insertPoint,listSize);

case REVERSE:
return reverse_cost(list,start,end,listSize);
}

}


float trans_cost(list,start,end,insertPoint,listSize)
struct ListElement **list;
int start, end, insertPoint, listSize;
{ float cost, energy();

cost = 0;
/* Break the current connections. */

if(start > 0) cost -= energy(list, start-1, start);
if(end < listSize - 1) cost -= energy(list, end, end+1);
if(insertPoint > 0) cost -= energy(list,insertPoint, insertPoint -1);

/* Build the new connections. */

cost += energy(list, insertPoint , end);
if(insertPoint - 1 >= 0 ) cost += energy(list,insertPoint - 1,
start);
if(start > 0 && end < listSize - 1 )
cost += energy(list, start - 1, end + 1);

return cost/listSize;
}

float reverse_cost(list,start,end,listSize)
struct ListElement **list;
int start, end, listSize;
{ float cost, energy();

cost = 0;

/*Subtract the old cost. */

if(start > 0) cost -= energy(list, start - 1, start);
if(end < listSize- 1) cost -= energy(list,end,end+1);


/* Add the new cost. */

if(start > 0) cost += energy(list,start - 1, end);
if(end < listSize-1) cost += energy(list,start,end+1);

return cost/listSize;

}


float energy(list, v1, v2)
struct ListElement **list;
int v1, v2;
{
/* YOU MUST CHANGE THIS FUNCTION TO CALCULATE THE
THE "ENERGY" BETWEEN TWO ELEMENTS IN YOUR LIST. HERE WE
JUST CALCULATE THE PATH LENGTH BETWEEN TWO POINTS ON A PLANE*/

return (float)ALEN(list[v1]->x,list[v2]->x,list[v1]->y,list[v2]->y);

}


void AlterList(list, start, end, insertPoint, alteration, listSize)
struct ListElement **list;
int start, end, insertPoint, alteration;
{ struct ListElement *holder, **dumList;
int i, j;

switch(alteration)
{ case REVERSE:
for(i = start, j = end; i < j; i++, j--){
holder = list[i];
list[i] = list[j];
list[j] = holder;
}
return;


case TRANSPOSE:
dumList = (struct ListElement **)malloc(sizeof(struct ListElment *)
*listSize);

for(j = 0, i = start; i <= end; i++, j++) /* Copy group. */
dumList[j] = list[i];

if(insertPoint > end){ /* Move downward. */
for(j=end+1, i = start; j < insertPoint; i++, j++)
list[i] = list[j];

for(j = insertPoint - (end - start + 1), i = 0; j < insertPoint;
i++, j++)
list[j] = dumList[i]; /* Reinstall group. */
}
else {
for(j=start - 1, i = end; j >= insertPoint; i--, j--)
list[i] = list[j]; /* Move upward. */

for(j = insertPoint, i = 0; i <= (end - start); i++, j++)
list[j] = dumList[i];

}

free(dumList);

return;
}


}


#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>

#define TEMP_FACTOR 0.9
#define YES 1
#define NO 0
#define REVERSE 1
#define TRANSPOSE 0
#define NUMLISTITEMS 200 /* Num items on the list. YOU MAY NEED TO
CHANGE THIS NUMER TO SUIT YOUR
APPLICATION. */

#define ALEN(a,b,c,d) sqrt(((b)-(a))*((b)-(a))+((d)-(c))*((d)-(c)))

struct ListElement
{
/*DEFINE YOUR DATA STRUCTURE HERE. WE'VE ASSUMED SOMETHING
LISTED IN CARTESIAN COORDINATES. IF YOU'RE DATA IS NOT IN
THESE COORDINATES, YOU WILL NEED TO MODIFY THIS STRUCTURE
AND ALSO MAKE THE NECESSARY CHANGES IN THE ENERGY FUNCTION. */

float x;
float y;
};

int CHECKBEST = NO;
float BESTENERGY;
struct ListElement **bestList;


main()
{ struct ListElement **list;
int runLimit, sucLimit, numListItems, i, numSuc;
int Anneal();
float temperature, energy;
struct ListElement **setup();
FILE *outFile, *energyFile;
void printList();

float GetEnergy(), ener;

numListItems = NUMLISTITEMS;

list = setup(&energy, &temperature, &runLimit, &sucLimit,
numListItems);

outFile = fopen("InitList.dat","w");
printList(outFile,list, numListItems);
fclose(outFile);

energyFile = fopen("energy.dat", "w");
fprintf(energyFile,"Temp\tEnergy\tnumSuc\n");

for(i = 1; i < numListItems; i++)
{
numSuc = Anneal(list, numListItems, runLimit, temperature, sucLimit,
numListItems);
ener = GetEnergy(list,numListItems);

printf("%f\t%f\t%d\n",temperature,ener,numSuc);
fprintf(energyFile,"%f\t%f\t%d\n",temperature,ener,numSuc);

if(numSuc <= runLimit*0.02 && CHECKBEST == NO) { /* Start checking
for the best solution?*/
CHECKBEST = YES;
BESTENERGY = ener;
}

if(numSuc == 0) break;

temperature *= TEMP_FACTOR;
}

fclose(energyFile);

outFile = fopen("FinalList.dat","w");
printList(outFile,list, numListItems);
fclose(outFile);

outFile = fopen("BestList.dat","w");
printList(outFile,bestList,numListItems);
fclose(outFile);

outFile = fopen("lowestEnergy.dat","w");
fprintf(outFile,"Lowest Energy = %f\n",BESTENERGY); /* Store energy.
*/
fclose(outFile);


}


void printList(outFile,list, numListItems)
FILE *outFile;
struct ListElement **list;
int numListItems;
{
int i;

for(i=0; i< numListItems; i++)
fprintf(outFile,"%f\t%f\n",list[i]->x,list[i]->y);


}


struct ListElement **setup(energy, temperature, runLimit, sucLimit,
numListItems)

int *runLimit, *sucLimit, numListItems;
float *temperature, *energy;
{ struct ListElement **CreateInitialList(), **list;
float GetEnergy();

list = CreateInitialList(numListItems);
*energy = GetEnergy(list, numListItems);
*temperature = *energy/numListItems;
*runLimit = 100 * numListItems;
*sucLimit = 10 * numListItems;

return list;
}

struct ListElement **CreateInitialList(numListItems)
int numListItems;
{ int i;
struct ListElement **list;
void InitializeElement();

/* Allocate memory for the array of pointers. */
list = (struct ListElement **)malloc(sizeof(struct ListElement *) *
numListItems);
bestList = (struct ListElement **)malloc(sizeof(struct ListElement *)
* numListItems);

/* Create the data structures and install pointers to them into the
list. */
for(i = 0; i < numListItems; i++)
list[i] = (struct ListElement *)malloc(sizeof(struct ListElement));

for(i = 0; i < numListItems; i++) /* Set initial values. */
InitializeElement(list[i]);

return list;
}

void InitializeElement(element)
struct ListElement *element;
{
/* NOTE: YOU WILL HAVE TO CHANGE THIS FUNCTION. THIS FUCTION
SETS THE INTIAL VALUES IN THE DATA STRUCTURE. HERE WE JUST
SET THE COORDINATES TO NUMBERS BETWEEN ZERO AND 100. */

element->x = (float)rand()/RAND_MAX * 100;
element->y = (float)rand()/RAND_MAX * 100;
}


float GetEnergy(list, numListItems)
struct ListElement **list;
int numListItems;
{ int i;
float ener, energy();

for(ener = 0, i = 0; i < numListItems - 1; i++)
ener += energy(list, i, i+1);

return ener;
}

/* THIS FUNCTION CARRIES OUT THE ANNEALING PROCEEDURE. */

int Anneal(list, listSize, runLimit, temperature, sucLimit,
numListItems)
struct ListElement **list;
int listSize, runLimit, sucLimit, numListItems;
float temperature;
{
int numSuc, start, end, insertPoint, alteration, answer, i, j;
int Oracle(), PickAlteration();
float Ediff, EnergyDif();
void GetSegment(), AlterList();
FILE *bestFile;

float GetEnergy(), ener;

numSuc = 0;

for(i = 0; i < runLimit; i++){
GetSegment(&start, &end, &insertPoint, numListItems);

alteration = PickAlteration();
Ediff = EnergyDif(list, start, end, insertPoint, numListItems,
alteration);


if(Oracle(Ediff, temperature) == YES){
AlterList(list,start,end, insertPoint, alteration, numListItems);
numSuc++;
if(CHECKBEST == YES) {
ener = GetEnergy(list,numListItems);
if(ener < BESTENERGY) { /* Save best list. */
BESTENERGY = ener;
for(j = 0; j < numListItems; j++) bestList[j] = list[j];
}
}
}

if(numSuc >= sucLimit) break;

}

return numSuc;
}


/* THIS FUNCTION DECIDES IF A NEW PATH SHOULD BE KEPT. */

int Oracle(Edif, temperature)
float Edif, temperature;
{

if(Edif < 0.0 || exp(-Edif/temperature) > (double)rand()/RAND_MAX)
return YES;

return NO;
}


/* THIS FUNCTION DESCIDES WHETHER TO TRY REVERSING THE PATH OR
TRANSPOSING IT. */

int PickAlteration(void)
{
if((double)rand()/RAND_MAX < 0.5) return REVERSE;

return TRANSPOSE;
}


/* THIS FUNCTION SELECTS A SEGMENT FOR POSSIBLE ALTERATION. */
void GetSegment(start, end, insertPoint, listSize)
int *start, *end, *insertPoint, listSize;
{ int shuffle[3], done = NO, i, j, hold;

do{ /* Select three different numbers between 0 and listSize - 1 */
for(i = 0; i <3; i++)
shuffle[i] = (int)(((float)rand()/RAND_MAX)*(listSize - 1));

if(shuffle[0] == shuffle[1] || /* Make sure no two are the same.
*/
shuffle[0] == shuffle[2] ||
shuffle[1] == shuffle[2]) ;
else done = YES;

}while(done == NO);


/* Sort these numbers. */

for(i = 0; i < 3; i++){
for(j = i + 1; j < 3; j++){
if(shuffle[i] > shuffle[j]){
hold = shuffle[i];
shuffle[i] = shuffle[j];
shuffle[j] = hold;
}
}
}

/* Decide whether to set the insertPoint above or below the block to
be altered. */

if((double)rand()/RAND_MAX < 0.5 || shuffle[2] - 1 == shuffle[1]){
*insertPoint = shuffle[0];
*start = shuffle[1];
*end = shuffle[2];
}
else{
*start = shuffle[0];
*end = shuffle[1];
*insertPoint = shuffle[2];
}
}


float EnergyDif(list, start, end, insertPoint, listSize, alteration)
struct ListElement **list;
int start, end, insertPoint, alteration;
{
float trans_cost(), reverse_cost();

switch(alteration){
case TRANSPOSE:
return trans_cost(list,start,end,insertPoint,listSize);

case REVERSE:
return reverse_cost(list,start,end,listSize);
}

}


float trans_cost(list,start,end,insertPoint,listSize)
struct ListElement **list;
int start, end, insertPoint, listSize;
{ float cost, energy();

cost = 0;
/* Break the current connections. */

if(start > 0) cost -= energy(list, start-1, start);
if(end < listSize - 1) cost -= energy(list, end, end+1);
if(insertPoint > 0) cost -= energy(list,insertPoint, insertPoint -1);

/* Build the new connections. */

cost += energy(list, insertPoint , end);
if(insertPoint - 1 >= 0 ) cost += energy(list,insertPoint - 1,
start);
if(start > 0 && end < listSize - 1 )
cost += energy(list, start - 1, end + 1);

return cost/listSize;
}

float reverse_cost(list,start,end,listSize)
struct ListElement **list;
int start, end, listSize;
{ float cost, energy();

cost = 0;

/*Subtract the old cost. */

if(start > 0) cost -= energy(list, start - 1, start);
if(end < listSize- 1) cost -= energy(list,end,end+1);


/* Add the new cost. */

if(start > 0) cost += energy(list,start - 1, end);
if(end < listSize-1) cost += energy(list,start,end+1);

return cost/listSize;

}


float energy(list, v1, v2)
struct ListElement **list;
int v1, v2;
{
/* YOU MUST CHANGE THIS FUNCTION TO CALCULATE THE
THE "ENERGY" BETWEEN TWO ELEMENTS IN YOUR LIST. HERE WE
JUST CALCULATE THE PATH LENGTH BETWEEN TWO POINTS ON A PLANE*/

return (float)ALEN(list[v1]->x,list[v2]->x,list[v1]->y,list[v2]->y);

}


void AlterList(list, start, end, insertPoint, alteration, listSize)
struct ListElement **list;
int start, end, insertPoint, alteration;
{ struct ListElement *holder, **dumList;
int i, j;

switch(alteration)
{ case REVERSE:
for(i = start, j = end; i < j; i++, j--){
holder = list[i];
list[i] = list[j];
list[j] = holder;
}
return;


case TRANSPOSE:
dumList = (struct ListElement **)malloc(sizeof(struct ListElment *)
*listSize);

for(j = 0, i = start; i <= end; i++, j++) /* Copy group. */
dumList[j] = list[i];

if(insertPoint > end){ /* Move downward. */
for(j=end+1, i = start; j < insertPoint; i++, j++)
list[i] = list[j];

for(j = insertPoint - (end - start + 1), i = 0; j < insertPoint;
i++, j++)
list[j] = dumList[i]; /* Reinstall group. */
}
else {
for(j=start - 1, i = end; j >= insertPoint; i--, j--)
list[i] = list[j]; /* Move upward. */

for(j = insertPoint, i = 0; i <= (end - start); i++, j++)
list[j] = dumList[i];

}

free(dumList);

return;
}


}

)


I do not not have the time to deep analize this (goods algoritm) but
somehow does it seems it belongs here and I
hope other users from this forum will check the issue in its broader
form .

G


PS
As for you (scr and parked former capra ) I had to put all in safe
mode before our safe sex by information and international law etc
Have A Good Day and Welcome TO

FF EU4 ALL FOR ALL

stran...@gmail.com

unread,
Jan 19, 2009, 2:38:50 AM1/19/09
to
> >http://docs.google.com/Doc?id=dcrqfcdb_5847prv7f9http://docs.google.c...

> > )
>
> > G- Hide quoted text -
>
> > - Show quoted text -
>
> sequence has ...
>
> read more »- Hide quoted text -

>
> - Show quoted text -

http://groups.google.com/group/soc.culture.usa/browse_thread/thread/7b7c49af68fe066b?hl=en#

fractal...@gmail.com

unread,
Jan 20, 2009, 12:51:05 AM1/20/09
to
> ...
>
> read more »- Hide quoted text -
>
> - Show quoted text -

http://groups.google.com/group/soc.culture.romanian/msg/6ee223b060c687f2?hl=en

G

fractal...@gmail.com

unread,
Jan 20, 2009, 1:18:45 AM1/20/09
to
> ...
>
> read more »- Hide quoted text -
>
> - Show quoted text -

http://groups.google.com/group/soc.culture.romanian/msg/73ef38d6aa4d872c?hl=en

G

fractal...@gmail.com

unread,
Jan 20, 2009, 3:44:16 AM1/20/09
to
> ...
>
> read more »- Hide quoted text -
>
> - Show quoted text -


(
*RADIUM = 88 Elementh
RF ENCODING AND ODESSA
88 = HH = HAIL , HITLER,
http://periodic.lanl.gov/elements/88.html
http://en.wikipedia.org/wiki/Radio_frequency
http://digitechmedia.com/sitebuildercontent/sitebuilderpictures/digitech-cell-tower-antena.JPG

Also CIA = SEA = WAVES = ~ USED TO COMMAND TERROR TROUGH USENET

*http://en.wikipedia.org/wiki/The_Fifth_Element
Another plan of the (parked us) to save the world from themselvs and
forth reich as the real goal .

)

G

mandelbr...@gmail.com

unread,
Jan 20, 2009, 4:35:33 AM1/20/09
to
> ...
>
> read more »- Hide quoted text -
>
> - Show quoted text -

http://docs.google.com/Doc?id=dd5cnwbm_0hhbmxpg2

G

fractal...@gmail.com

unread,
Jan 20, 2009, 7:20:30 AM1/20/09
to
> ...
>
> read more »- Hide quoted text -
>
> - Show quoted text -

http://groups.google.com/group/soc.culture.romanian/browse_thread/thread/0a9f235be784d503?hl=en#


G

fractal...@gmail.com

unread,
Feb 1, 2009, 9:36:34 AM2/1/09
to
> ...
>
> read more »- Hide quoted text -
>
> - Show quoted text -

http://groups.google.com/group/soc.culture.usa/browse_thread/thread/562c7c652650097f?hl=en#

G

fractal...@gmail.com

unread,
Feb 2, 2009, 11:09:17 AM2/2/09
to

stran...@gmail.com

unread,
Feb 3, 2009, 3:54:39 AM2/3/09
to
> ...
>
> read more »- Hide quoted text -
>
> - Show quoted text -

http://groups.google.com/group/soc.culture.romanian/browse_thread/thread/4b472e30cb504db4?hl=en#

G

stran...@gmail.com

unread,
Feb 3, 2009, 7:29:04 AM2/3/09
to
> ...
>
> read more »- Hide quoted text -
>
> - Show quoted text -

http://groups.google.com/group/soc.culture.romanian/browse_thread/thread/fe6ed64be4fc65b6?hl=en#


G

stran...@gmail.com

unread,
Feb 3, 2009, 11:16:11 AM2/3/09
to
> ...
>
> read more »- Hide quoted text -
>
> - Show quoted text -

http://groups.google.com/group/soc.culture.usa/browse_thread/thread/a3aa2f8f0164b2be?hl=en#


G

stran...@gmail.com

unread,
Feb 4, 2009, 2:53:04 AM2/4/09
to
> ...
>
> read more »- Hide quoted text -
>
> - Show quoted text -

http://groups.google.com/group/soc.culture.romanian/browse_thread/thread/f7b48af7609372a0?hl=en#


G

stran...@gmail.com

unread,
Feb 5, 2009, 11:04:03 AM2/5/09
to
> ...
>
> read more »- Hide quoted text -
>
> - Show quoted text -

http://groups.google.com/group/soc.culture.romanian/browse_thread/thread/e5fd3207e6d80301?hl=en#

G

fractal...@gmail.com

unread,
Feb 7, 2009, 10:51:06 AM2/7/09
to
> ...
>
> read more »- Hide quoted text -
>
> - Show quoted text -


http://groups.google.com/group/soc.culture.romanian/browse_thread/thread/cf8c4fa09e9f5a7c?hl=en#


G

fract...@gmail.com

unread,
Feb 13, 2009, 1:19:14 AM2/13/09
to
> ...
>
> read more »- Hide quoted text -
>
> - Show quoted text -

http://groups.google.com/group/soc.culture.romanian/browse_thread/thread/7e7999487762405f?hl=en#

G

stran...@gmail.com

unread,
Feb 15, 2009, 5:01:26 AM2/15/09
to

stran...@gmail.com

unread,
Feb 15, 2009, 7:26:03 AM2/15/09
to
On Feb 13, 8:19 am, fractal0...@gmail.com wrote:
> ...
>
> read more »- Hide quoted text -
>
> - Show quoted text -

http://groups.google.com/group/soc.culture.romanian/browse_thread/thread/7dc9d5d19c688a24?hl=en#


G

stran...@gmail.com

unread,
Feb 16, 2009, 2:14:38 AM2/16/09
to

stran...@gmail.com

unread,
Feb 16, 2009, 10:10:48 AM2/16/09
to

stran...@gmail.com

unread,
Feb 17, 2009, 7:26:17 AM2/17/09
to
On Feb 13, 8:19 am, fractal0...@gmail.com wrote:
> ...
>
> read more »- Hide quoted text -
>
> - Show quoted text -

http://groups.google.com/group/alt.politics.org.nsa/browse_thread/thread/1dd463e21d8f9031?hl=en#


G

stran...@gmail.com

unread,
Feb 17, 2009, 10:44:34 AM2/17/09
to
> ...
>
> read more »- Hide quoted text -
>
> - Show quoted text -

http://picasaweb.google.com/strangeatr/DataToBeCheckedIfFalseHoweverThisIsWhatTheyAreDoing?feat=directlink

Please Check This Data
It is what they are doing (however sometimes cia has falsified the
true for psy op in order to denay it afterwards )

G

fractal...@gmail.com

unread,
Feb 18, 2009, 9:50:30 AM2/18/09
to
> ...
>
> read more »- Hide quoted text -
>
> - Show quoted text -

http://groups.google.com/group/soc.culture.romanian/browse_thread/thread/c788257f34811b68?hl=en#


G

fractal...@gmail.com

unread,
Feb 18, 2009, 9:58:07 AM2/18/09
to

stran...@gmail.com

unread,
Feb 19, 2009, 2:29:39 AM2/19/09
to

stran...@gmail.com

unread,
Feb 19, 2009, 10:17:47 AM2/19/09
to
> ...
>
> read more »- Hide quoted text -
>
> - Show quoted text -

http://groups.google.com/group/soc.culture.usa/browse_thread/thread/63fab617c5f1f99a?hl=en#


G

stran...@gmail.com

unread,
Feb 21, 2009, 12:20:08 PM2/21/09
to
> ...
>
> read more »- Hide quoted text -
>
> - Show quoted text -

http://groups.google.com/group/soc.culture.romanian/browse_thread/thread/25cb6f5c48e33ef5?hl=en#


G

scar...@sas.org

unread,
Feb 21, 2009, 7:00:44 PM2/21/09
to
Hi Everybody,

I wrote this article and the code that you see published above. More,
I own the copyrights to this article along with Scientific American
and I am the sole owner of the code. The author of this post has
stolen this material from a CD I produced and that I sell so I can
take care of my family. The CD contains every single article that
ever appeared in The Amateur Scientist department of Scientific
American magazine and I spent over a year of my life and over $100,000
to put it all together. The poster did not ask for permission to
reprint this and so this post is direct violation of US copyright
law.

The poster should have reviewed the article, explained why he liked
it, and told people where to go to get it plus 1000 other similar
articles. Or he could have asked me for permission to reprint it, and
I very likely would have said yes if he also included a link to my
website so others could buy the CD if they wanted to. (http://
www.brightscience.com)

Under the circumstances, I am afraid that I must insist that it be
removed. If it is not removed by Monday I am going to take the issue
up with Google. They tend to take a harsh view of folks who use their
forums to violate other people's copyrights.

We're not all large corporations. I have four children, including one
with special needs, and I have always worked to make the world a
better place through science education. I'm not rich and I need the
income from this product to support the other work I do to educate
kids through my non-profit efforts. I can't permit people to hurt my
family income by giving away for free the stuff I worked so hard to
create.

Sincerely,

Shawn Carlson, Ph.D.
Founder and Executive Director
Society for Amateur Scientists

Former columnist--Scientific American

stran...@gmail.com

unread,
Feb 21, 2009, 7:34:46 PM2/21/09
to


call me on HAGUE AT ICC COURT AND IF YOU EVEN RISE BY MISTAKE THE
ISSUE AGAIN YOU WILL BE DISTRIBUTIVLY
SUED BY MOST NATIONSON PLANET AND MIGHT FIND YOURSELF IN JAIL FOR
CONSPIRACY TO HIDE HOLOCAUST.
ANY TOP DIRECTOR IN GOGLEEVEN THINKINKIG TOLISTEN TO YOU GETS IN ICC .
YOUR REQUEST DENIED AND PARKEDE.

G

stran...@gmail.com

unread,
Feb 22, 2009, 2:10:37 AM2/22/09
to

stran...@gmail.com

unread,
Feb 22, 2009, 4:49:05 AM2/22/09
to
> http://groups.google.com/group/soc.culture.romanian/browse_thread/thr...

>
> G- Hide quoted text -
>
> - Show quoted text -

GOOD FRACTAL REPRESENTATION
http://docs.google.com/Doc?id=dcrqfcdb_177gmfxdgc8


G

stran...@gmail.com

unread,
Feb 22, 2009, 4:55:35 AM2/22/09
to

stran...@gmail.com

unread,
Feb 22, 2009, 5:14:23 AM2/22/09
to

stran...@gmail.com

unread,
Feb 22, 2009, 7:26:40 AM2/22/09
to

stran...@gmail.com

unread,
Feb 22, 2009, 9:02:10 AM2/22/09
to

fractal...@gmail.com

unread,
Feb 23, 2009, 7:27:43 AM2/23/09
to

fractal...@gmail.com

unread,
Feb 23, 2009, 7:30:21 AM2/23/09
to

mandelbr...@gmail.com

unread,
Feb 23, 2009, 11:23:11 AM2/23/09
to

stran...@gmail.com

unread,
Feb 25, 2009, 4:22:13 PM2/25/09
to

stran...@gmail.com

unread,
Feb 26, 2009, 6:37:23 AM2/26/09
to

stran...@gmail.com

unread,
Mar 2, 2009, 10:50:11 PM3/2/09
to

stran...@gmail.com

unread,
Mar 3, 2009, 6:25:04 AM3/3/09
to

stran...@gmail.com

unread,
Mar 5, 2009, 12:57:38 PM3/5/09
to
> > > > > > - Show quoted text -
>
> > > > >http://groups.google.com/group/soc.culture.romanian/browse_thread/thr...
>
> > > > > G- Hide quoted text -
>
> > > > > - Show quoted text -
>
> > > >http://groups.google.com/group/soc.culture.usa/browse_thread/thread/7...
>
> > > > G- Hide quoted text -
>
> > > > - Show quoted text -
>
> > > reason for them to steal my id card .http://groups.google.com/group/soc.culture.romanian/browse_thread/thr...
>
> > >http://groups.google.com/group/soc.culture.usa/browse_thread/thread/7...
>
> > > G- Hide quoted text -
>
> > > - Show quoted text -
>
> >http://groups.google.com/group/alt.politics.org.nsa/browse_thread/thr...
>
> > G- Hide quoted text -
>
> > - Show quoted text -
>
> http://groups.google.com/group/soc.culture.romanian/msg/4522e35c626d6...

>
> G- Hide quoted text -
>
> - Show quoted text -

http://groups.google.com/group/soc.culture.romanian/msg/4b8e8fceda0af997?hl=en

mars

G

stran...@gmail.com

unread,
Mar 5, 2009, 1:41:42 PM3/5/09
to
> http://groups.google.com/group/soc.culture.romanian/msg/4b8e8fceda0af...
>
> mars

>
> G- Hide quoted text -
>
> - Show quoted text -

(http://groups.google.com/group/soc.culture.romanian/msg/
a3911c3b8f2150cd?hl=en)


G

stran...@gmail.com

unread,
Mar 6, 2009, 3:50:54 AM3/6/09
to

(Path: g2news2.google.com!news2.google.com!news.glorb.com!
news2.glorb.com!feeder.erje.net!news.germany.com!
peer3.news.newnet.co.uk!feed.cnntp.org!news.cnntp.org!not-for-mail
Date: Thu, 05 Mar 2009 17:10:14 +0100
From: =?windows-1252?Q?G00g1e_=A7=80aRcH?= <m...@privacy.net>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:
1.8.1.19) Gecko/20081204 SeaMonkey/1.1.14
MIME-Version: 1.0
Newsgroups: soc.culture.romanian
Subject: Re: AC DE COJOCUL VOSTRU, BANDERA ROSA
References: <ddcdac82-177e-4b32-
ad05-31b...@q9g2000yqc.googlegroups.com>
In-Reply-To: <ddcdac82-177e-4b32-
ad05-31b...@q9g2000yqc.googlegroups.com>
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 31
Message-ID: <49aff967$0$3337$6e1e...@read.cnntp.org>
Organization: CNNTP
NNTP-Posting-Host: 9155abf5.read.cnntp.org
X-Trace: DXC=K6gOF?6Q]hlXMoNd=::YAkWoT\PAgXa?aUCXN0\553WfA
\oCmPe45MmMVeFd;\8\BddHW2N>Q0gkkKFImL8d>R8l
X-Complaints-To: ab...@cnntp.org

X-No-Archive: Yes

PitikUS wrote:

>>voi ca system us sintetii istoriee pentru ca in conditiile actuale
>>sintetii un pericol si un focar de infectie algoritmica si continuarea
>>voastra ca system implica (zero) humanity again!
>>and again! redudant .

Wow, asta da antiamericanism! Si zi asa, Sabine, viza ta pentru US e
valabila pana in 2012? Sa nu mergi acolo, ca te-or duce aceia la
Guantanamo sa te bage in priza la lampa Rf. Sa te imbraci cu Bandiera
Rossa, ca sa nu penetreze Rf.

>>Ramine exact asa cum am hotarit lucru deja inceput si aprobat de voi
>>insusii

Restul e susi.

>>aka bandera rosa safe in us =1
>>multumesc populatieii

Nu multzumi numai din buze: daruieste populatiei niste Cabernet
Sauvignon.

>>pentru aprobarea ca viitorul regim sa lucreze cu icc .

Concetatenii tai conlucreaza cu ICC?

>Microwave Weapons for Crowd Control

Pentru controlul friptanului.
)


G

stran...@gmail.com

unread,
Mar 14, 2009, 3:19:47 AM3/14/09
to
> ad05-31b8ae378...@q9g2000yqc.googlegroups.com>
> In-Reply-To: <ddcdac82-177e-4b32-
> ad05-31b8ae378...@q9g2000yqc.googlegroups.com>

> Content-Type: text/plain; charset=windows-1252; format=flowed
> Content-Transfer-Encoding: 7bit
> Lines: 31
> Message-ID: <49aff967$0$3337$6e1ed...@read.cnntp.org>
> G- Hide quoted text -
>
> - Show quoted text -

http://groups.google.com/group/soc.culture.romanian/browse_thread/thread/6dbadaad5bfef135?hl=en#


G

0 new messages