(**Question 2 - FIG 4,5,6 **)
(** n-number of spins, i-number of up spins, k=\beta\epsilon**)

n=60;k=0.8; (*k =\beta\epsilon*) (*for FIG 4 k=0.8,for FIG 5 k=1.0, for FIG 6 k=1.2 *)
vec1=Solve[ Sum[z^i Exp[k/(2n)(n-2i)^2]Binomial[n,i],{i,0,n}]==0,z];
vec2=Solve[ Sum[z^i Exp[k/(2n)(n-2i)^2]Exp[-1/(2n)((n-2i)^2 +1/(6n^2)(n-2i)^4)],{i,0,n}]==0,z];
data1=Table[N[vec1[[i]][[1]][[2]]],{i,1,n}];
data2=Table[N[vec2[[i]][[1]][[2]]],{i,1,n}];
p1=ListPlot[{Re[#],Sign[Im[#]]Sqrt[1-Re[#]^2]}&/@data1,AxesOrigin->{0,0},PlotRange->{{-1.2,1.2},{-1.2,1.2}},ImagePadding->100,AspectRatio->1,Frame->True,FrameLabel->{{Im,None},{Re,"complex plane"}},PlotStyle->Directive[Red,PointSize[.02]]];
p2=ListPlot[{Re[#],Sign[Im[#]]Sqrt[1-Re[#]^2]}&/@data2,AxesOrigin->{0,0},PlotRange->{{-1.2,1.2},{-1.2,1.2}},ImagePadding->100,AspectRatio->1,Frame->True,FrameLabel->{{Im,None},{Re,"complex plane"}},PlotStyle->Directive[Blue,PointSize[.02]]];


Show[p1,p2,Graphics@Circle[{0,0},1]]

(**Question 1 - FIG 1,2,3 **)
n=60;k=0.8; (*k =\beta\epsilon*)(*for FIG 1 k=0.8,for FIG 2 k=1.0, for FIG 3 k=1.2 *)
data=Table[-Exp[-4k]+(1-Exp[-4k])Cos[(2m-1)Pi/n]+I(2m-n-1),{m,1,n}];
p=ListPlot[{Re[#],Sign[Im[#]]Sqrt[1-Re[#]^2]}&/@data,AxesOrigin->{0,0},PlotRange->{{-1.2,1.2},{-1.2,1.2}},ImagePadding->100,AspectRatio->1,Frame->True,FrameLabel->{{Im,None},{Re,"complex plane"}},PlotStyle->Directive[Red,PointSize[.02]]];
Show[p,Graphics@Circle[{0,0},1]]