It's been a long semester, and I have to drop a course because i am not doing well in all others. Well, frankly, I think I have learnt my lesson, that is study is not about concentration and resource, the more time you spend and the more resources you used, the better understanding you will have. So the plan for this winter is first, finish complex variable, and prof it at the beginning of the semester, also, check the am I still in the group, then study some part of 427,436,and of course if possible 470. This seems to be impractical, I will make time table for each in detail. Hope, I won't be lost again for the next semester, and also I have to start to search for summer research. So, the winter is clearly not a break for me. Living in busy time is kind of pleasure, if I can retrieve passion from it, no matter success or failure.
The step towards a subject, you should first sketch a rough blueprint for that, like a content table for a book, and then list some of the important theorem or methods or concepts for each topic, and then practice them for some amounts of problems (find a good problem book) to get a concrete understanding for each of the concept. THIS IS VERY CRUCIAL!!!!!!!!
2009年12月17日星期四
2009年6月26日星期五
2009年5月31日星期日
2009年5月16日星期六
Ural 1513的递推
做了Ural 1513,由于懒得写高精度,所以还是WA,不过这个递推是经过了思考的,思路如下,用一个二维数组来记录在长度为i时的可能情况数,这样的话,如果i<=k那么我们就不用顾忌,dp[i,'L']=dp[i-1,'L']+dp[i-1,'B'] and dp[i,'B']=dp[i-1,'L']+dp[i-1,'B'], 一旦i>k,那么dp[i,'L']=dp[i-1,'L']+dp[i-1,'B']-dp[i-k-1,'B'],也就是说,在累加所有上一个长度可能情况的同时,我们只需要排除从i到i-k都为L而i-k-1位置为B的情况(有待完善。。。)
2009年5月9日星期六
2009年5月5日星期二
Summer Plan
1.ACMs(Tire and Automata, Probability Problem Random Shooting SGU,SGU431,SGU 打印N个自身)
2.Self Study (Differential Equation, E&M II, Quantum II, Complex Analysis)
3.Crackme
4.Probability Challenge
5.Project Euler
6.Tensor
7.Harvard 100 Problem
8.CMU Puzzle
9.200 Physics Problem
10.Wittgenstein
11.Complex System
12.Mizar Proof(Prove Weak Form of Goldbach's Conjecture)
13.Numenta
14.Various Games(博弈)
15.felicity.iiit.ac.in
16.Different Metrcis(Godel Metric)
17.曙光 魔方 超级计算机(illinois supercomputing center)
18.AI-Code Robot Course
19. Develop a distributed project for my group
2.Self Study (Differential Equation, E&M II, Quantum II, Complex Analysis)
3.Crackme
4.Probability Challenge
5.Project Euler
6.Tensor
7.Harvard 100 Problem
8.CMU Puzzle
9.200 Physics Problem
10.Wittgenstein
11.Complex System
12.Mizar Proof(Prove Weak Form of Goldbach's Conjecture)
13.Numenta
14.Various Games(博弈)
15.felicity.iiit.ac.in
16.Different Metrcis(Godel Metric)
17.曙光 魔方 超级计算机(illinois supercomputing center)
18.AI-Code Robot Course
19. Develop a distributed project for my group
2009年4月29日星期三
2009年4月16日星期四
2009年3月26日星期四
2009年3月8日星期日
Beat Conway John
1 3
1 1 1 3
3 1 1 3
1 3 2 1 1 3
1 1 1 3 1 2 2 1 1 3
3 1 1 3 1 1 2 2 2 1 1 3
1 3 2 1 1 3 2 1 3 2 2 1 1 3
1 1 1 3 1 2 2 1 1 3 1 2 1 1 1 3 2 2 2 1 1 3
1 1 1 3
3 1 1 3
1 3 2 1 1 3
1 1 1 3 1 2 2 1 1 3
3 1 1 3 1 1 2 2 2 1 1 3
1 3 2 1 1 3 2 1 3 2 2 1 1 3
1 1 1 3 1 2 2 1 1 3 1 2 1 1 1 3 2 2 2 1 1 3
next line?
2009年2月13日星期五
A nice course on rubik's cube
This course discusses the inner relationship between Group Theory and Rubik' Cube, which seems very fascinating to me.
http://akbar.marlboro.edu/~mahoney/courses/Spr00/rubik.html
2009年1月13日星期二
Shity Recursion
This is a program that could be used to calculate rook polynomial which is putting rooks in a irregular chess board( more specifically, it can partially solve sgu269). Almost killed by recursion.
#include <iostream>
#include <fstream>
#include <memory>
using namespace std;
fstream fin;
int n,k,num[5],rk[5],ans[5][8],ma,mi;
void ready()
{
fin>>n>>k;
for (int i=1;i<=n;i++)
{
fin>>num[i];
if (num[i]>ma) ma=num[i];
rk[i]=(1 << num[i])-1;
}
if (ma>n)
mi=n;
else
mi=ma;
}
bool chk(int rook[])
{
for (int i=1;i<=n;i++)
if (rook[i]!=0)
return false;
return true;
}
void poly(int dep,int lev,int pow)
{
int tmp[5];
if (chk(rk)) //如果检查是空棋盘
{
ans[0][dep]=1;
return;
}
memcpy(tmp,rk,sizeof(tmp));
while (rk[lev]==0) lev++;
while ((rk[lev] & (1 << pow))!=(1 << pow))
pow++;
rk[lev]=rk[lev]- (1 << pow);
if (rk[lev]==0)
poly(dep+1,lev+1,0);
else poly(dep+1,lev,pow+1);
for (int l=0;l<=mi;l++)
{ans[l][dep]+=ans[l][dep+1];
ans[l][dep+1]=0;}
memcpy(rk,tmp,sizeof(rk));
rk[lev]=0;
for (int k=lev+1;k<=n;k++)
if ((rk[k])>=(1 << pow))
rk[k]=rk[k]- (1 << pow);
poly(dep+1,lev+1,0);
for (int l=1;l<=mi;l++)
{ans[l][dep]+=ans[l-1][dep+1];
ans[l-1][dep+1]=0;}
memcpy(rk,tmp,sizeof(rk));
}
int main()
{ fin.open("c:\\test.txt");
ready();
poly(1,1,0);
cout<<ans[k][1];
fin.close();
}
2009年1月7日星期三
POJ 2449 A* search K shortest path
First real C++ program
#include<iostream>
#include<fstream>
using namespace std;
int n,m,s,t,k,size;
int l[1001],l2[1001],her[1001],time[1001];
bool used[1001];
fstream fin;
int a,b,r;
struct edge{
int v,l,t;
};
struct key{
int v,value;
};
edge map[1001][1001],map2[1001][1001];
key data[1001],tmp;
void ready()
{
fin>>n>>m;
for (int i=1;i<=m;i++)
{
fin>>a>>b>>r;
l[a]++;
map[a][l[a]].v=b;
map[a][l[a]].l=r;
l2[b]++;
map2[b][l2[b]].v=a;
map2[b][l2[b]].l=r;
}
fin>>s>>t>>k;
if (s==t) k++;
}
void dijkstra()
{ int z;
for (int i=1;i<=n;i++)
her[i]=1000000;
her[t]=0;
for (int i=1;i<=n;i++)
{
int min=1000000;
for (int j=1;j<=n;j++)
if ((!used[j]) && (her[j]<min))
{
min=her[j];
z=j;
}
used[z]=true;
for (int j=1;j<=l2[z];j++)
{
if (her[z]+map2[z][j].l<her[map2[z][j].v])
her[map2[z][j].v]=her[z]+map2[z][j].l;
}
}
}
void push(int v,int i)
{ int tmp1;
key temp;
size++;
data[size].v=map[v][i].v;
data[size].value=tmp.value+map[v][i].l;
tmp1=size;
while (tmp1 > 1)
{
if (data[tmp1 >> 1].value+her[data[tmp1>>1].v]<data[tmp1].value+her[map[v][i].v]) break;
temp=data[tmp1];
data[tmp1]=data[tmp1 >> 1];
data[tmp1 >> 1]=temp;
tmp1= tmp1 >> 1;
}
}
void del()
{ key temp;
temp=data[size];
data[size]=data[1];
data[1]=temp;
size--;
int i = 1;
while ((i << 1) <= size)
{
int j;
j = i << 1;
if ((j < size) && (data[j + 1].value+her[data[j+1].v]< data[j].value+her[data[j].v])) j++;
if (data[i].value+her[data[i].v]< data[j].value+her[data[j].v]) break;
temp=data[i];
data[i]=data[j];
data[j]=temp;
i = j;
}
}
int a_star()
{
if( her[s]==1000000 ) return -1;
data[1].v=s;
data[1].value=0;
time[s]=0;
size=1;
while (size>0) {
time[data[1].v]++;
if (time[t]==k)
return data[1].value;
tmp=data[1];
del();
if (time[data[1].v]>k) continue;
for (int e=1;e<=l[tmp.v];e++)
{push(tmp.v,e);
}
}
return -1;
}
int main()
{
fin.open("c:\\test.txt");
ready();
dijkstra();
int ans;
ans=a_star();
cout<<ans;
fin.close();
}
订阅:
博文 (Atom)