Sunday 2 November 2014

How to color nodes in NS2

You can color the nodes in NS2. It is bit tricky to color them in a wireless network. We can do this by following code.

set node0 [$ns node]
$node0 color "blue"
$ns at 0.0 "$node0 color blue"

How to configure Eclipse for NS-2 (2.34) in Linux.


1) Install the NS2.

2) Make a backup copy of your NS2 folder, i.e. ns-allinone-2.34 somewhere so
    that you can reset the changes by replacing.
 
3) Download the Eclipse SDK 3.7.2 Indigo (Classic) from here. This file is
     approx. of size 174 MB.
 
4) Download the CDT from here. This file is approx. of size 44 MB.
 
5) Copy the "eclipse-SDK-3.7.2-linux-gtk.tar.gz" file to user folder (/home/user)
     and extract.
6) Open the eclipse and set the workspace as /home/user/ns-allinone-2.34.
 
7) Now in Eclipse go to Help->Install New Software... A window with name
    "install" will pop up. Then go to Add. Put the values as shown below.
    Name:- CDT
    Location:- Browse to the "cdt-master-6.0.2.zip" file.
 
8) Check "CDT Main Features" and "CDT Optional Features", click next,
    then accept license and finish. At last it will ask you to restart Eclipse, then
    choose Restart.
 
9) Now choose /home/user/ns-allinone-2.34 as workspace. Click New->C++
    Project. Put Project name:- ns-2.34 (It will warn you that a directory already
    exists. Just ignore it.). Choose Project type as make project->Empty project
    and Toolchains linux GCC and click finish.
 
10) Now go to Project->clean->clean projects selected below->ns-2.34 and OK.
 
11) Go to Project->Build All.
 
12) After build is completed without any error, go to Run->Run configurations.
      Double click C/C++ Application. For Project: browse to ns-2.34. Go to
      Search Project and click ns from Program selection window, then Apply and
      Run. If you get % sign in console, you are done.

13) (Optional) If you want to speed up the make time of NS2, just don't clean it,
       directly build all from Eclipse. It will get compiled in less than 5 seconds.
       All the best!

Terms Packet delivery ratio, Packet Lost, End to end delay

If you want to evaluate the performance of protocol using NS-2, first you have to define the evaluation criteria. This time I want to explore about Packet delivery ratio, packet lost and end to end delay.
What are they?
Packet delivery ratio : the ratio of the number of delivered data packet to the destination. This illustrates the level of delivered data to the destination.
∑ Number of packet receive / ∑ Number of packet send
The greater value of packet delivery ratio means the better performance of the protocol.
End-to-end Delay : the average time taken by a data packet to arrive in the destination. It also includes the delay caused by route discovery process and the queue in data packet transmission. Only the data packets that successfully delivered to destinations that counted.
∑ ( arrive time – send time ) / ∑ Number of connections
The lower value of end to end delay means the better performance of the protocol.
Packet Lost : the total number of packets dropped during the simulation.
Packet lost = Number of packet send – Number of packet received .
The lower value of the packet lost means the better performance of the protocol.
How to analyze trace file to find the result?
First : you must analyze the trace file with this Script PDR and E2ED
run this script with command :
awk -f PacketDeliveryRatio.awk (name trace file.tr)
awk -f Endtoenddelay.awk (name trace file.tr)

If error 
This is exactly what I need. However I couldn’t run the command. Probably I misunderstood something. On what file should I run “awk -f Endtoenddelay.awk (name trace file.tr)”
I downloaded the text file you provided, saved it as .awk file and run it like “awk -f pdr.awk ~/Desktop/mypackets.trace” but it returns all 0’s.

Solution
1. you must execute the awk files inside folder that contain your trace files.
2. please make sure that you are using new trace file format or old trace file format. you can check this type in your tcl schenario script.

how can i enable the new trace file format not the old one in the tcl script ?
You can changes it in your TCL file.
For example in this tcl files :
# wrls1.tcl
# A 3-node example for ad-hoc simulation with DSDV

# Define options
set val(chan) Channel/WirelessChannel ;# channel type
set val(prop) Propagation/TwoRayGround ;# radio-propagation model
set val(netif) Phy/WirelessPhy ;# network interface type
set val(mac) Mac/802_11 ;# MAC type
set val(ifq) Queue/DropTail/PriQueue ;# interface queue type
set val(ll) LL ;# link layer type
set val(ant) Antenna/OmniAntenna ;# antenna model
set val(ifqlen) 50 ;# max packet in ifq
set val(nn) 5 ;# number of mobilenodes
set val(rp) AODV ;# routing protocol
set val(x) 500 ;# X dimension of topography
set val(y) 400 ;# Y dimension of topography
set val(stop) 300 ;# time of simulation end

set ns [new Simulator]
set tracefd [open simple.tr w]
set windowVsTime2 [open win.tr w]
set namtrace [open simwrls.nam w]

$ns use-newtrace —————–> to enable new trace format
#$ns use-trace ——————-> if you delete tha “#” means that you enable old trace format
$ns trace-all $tracefd

#$ns new-trace-all $tracefd
$ns namtrace-all-wireless $namtrace $val(x) $val(y)

# set up topography object
set topo [new Topography]

$topo load_flatgrid $val(x) $val(y)
create-god $val(nn)

If Division by zero error
Maybe there is problem in the variable definition.
Please check your trace files. Make sure that you use new trace format or old trace format.
After that changes the number of variable.
For Example:
Based on trace format bellow, the time variable is in row 3. so put $3 in your variable definition. In this case time=$3;

#Example of new trace format
#1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
#s -t 1.142046604 -Hs 0 -Hd -2 -Ni 0 -Nx 1186.47 -Ny 1093.76 -Nz 0.00 -Ne 100.000000 -Nl AGT -Nw —
#
#22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
#Ma 0 -Md 0 -Ms 0 -Mt 0 -Is 0.0 -Id 40.0 -It cbr -Il 512 -If 0 -Ii 3 -Iv 32 -Pn cbr -Pi 1 -Pf 0 -Po 16777215
event = $1;
time = $3;
node = $5;
type = $19;
reason = $21;
packetid = $41;
packettype = $35;
src = $31;
dst = $33;
cbr_packetid = $47;
numhops = $49;
opt_numhops = $51;
energy = $17;
 Possible error

Hi when i type this command for delay i don’t have any result what’s the problem ??
Please check your trace files. Make sure that you use new trace format or old trace format.
After that changes the number of variable.
For Example:
Based on trace format bellow, the time variable is in row 3. so put $3 in your variable definition. In this case time=$3;

#Example of new trace format
#1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
#s -t 1.142046604 -Hs 0 -Hd -2 -Ni 0 -Nx 1186.47 -Ny 1093.76 -Nz 0.00 -Ne 100.000000 -Nl AGT -Nw —
#
#22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
#Ma 0 -Md 0 -Ms 0 -Mt 0 -Is 0.0 -Id 40.0 -It cbr -Il 512 -If 0 -Ii 3 -Iv 32 -Pn cbr -Pi 1 -Pf 0 -Po 16777215
event = $1;
time = $3;
node = $5;
type = $19;
reason = $21;
packetid = $41;
packettype = $35;
src = $31;
dst = $33;
cbr_packetid = $47;
numhops = $49;
opt_numhops = $51;
energy = $17;


How to set path in bashrc after Installation NS-2

How to Set environment variables after installation NS-2 finished?
$ gedit ~/.bashrc
Add the following lines to the end of the file. Remember replace “/your/path” by the folder where you have stored extracted the ns-2 file
# LD_LIBRARY_PATH
OTCL_LIB=/your/path/ns-allinone-2.34/otcl-1.13
NS2_LIB=/your/path/ns-allinone-2.34/lib
X11_LIB=/usr/X11R6/lib
USR_LOCAL_LIB=/usr/local/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIB:$X11_LIB:$USR_LOCAL_LIB

# TCL_LIBRARY
TCL_LIB=/your/path/ns-allinone-2.34/tcl8.4.18/library
USR_LIB=/usr/lib
export TCL_LIBRARY=$TCL_LIB:$USR_LIB

# PATH
XGRAPH=/your/path/ns-allinone-2.34/bin:/your/path/ns-allinone-2.34/tcl8.4.18/unix:/your/path/ns-allinone-2.34/tk8.4.18/unix
NS=/your/path/ns-allinone-2.34/ns-2.34/
NAM=/your/path/ns-allinone-2.34/nam-1.14/
PATH=$PATH:$XGRAPH:$NS:$NAM
Ensure the changes by execute this command:
$ source ~/.bashrc

If Problems
Solution
there are problem with your startx server. please try the solution in http://www.isi.edu/nsnam/ns/ns-problems.html

Black hole in AODV

I am trying to add a black hole to AODV-based MANET as a part of my study. I've found a good reference that tells how to add malicious node. The original link is here. His code is perfect. Everything runs smooth except when the very fast wireless links are used in the simulation. There were several warnings that relates to something I don't really remember. I will try to replicate that later and update in the blog someday. In order to get the simulation work, I tried tweaking the code a bit and found that adding C++ program syntax fixed that. Nothing much but a break. I will show my code which is changed a little bit from original one.

Add the following code in aodv.h
bool malicious;

around ( just before or after, it doesn't really matter)
double PerHopTime(aodv_rt_entry *rt);

In aodv.cc, the constructor shall be initialized with malicious=false.
/*
Constructor
*/
AODV::AODV(nsaddr_t id) : Agent(PT_AODV),
btimer(this), htimer(this), ntimer(this),
rtimer(this), lrtimer(this), rqueue() {
index = id;
seqno = 2;
bid = 1;
malicious = false; // code added

So far, aodv works the same with before the changes. To command a black hole start functioning, the command will be passed from TCL file. AODV needs to be programmed in a way so that it catches the passed parameter and started acting like a black hole. Thus, the following code is looked for in aodv.cc.

if(argc == 2) {
Tcl& tcl = Tcl::instance();
if(strncasecmp(argv[1], "id", 2) == 0) {
tcl.resultf("%d", index);
return TCL_OK;
}

And the following lines are added.

if(strcmp(argv[1], "malnode") == 0) {
malicious = true;
return TCL_OK;
}

In TCL, a malicious node or black hole is set by using the following command. It should be added after the nodes have been initialized.

$ns at 0.0 "[$node_(5) set ragent_] malnode"

Finally, the procedure which a black hole will be performed is going to be added. The following code segment is looked for in aodv.cc.

/*
Route Handling Functions
*/
void
AODV::rt_resolve(Packet *p) {
struct hdr_cmn *ch = HDR_CMN(p);
struct hdr_ip *ih = HDR_IP(p);
aodv_rt_entry *rt;
...

The following lines are added.
if (malicious == true ) {
drop(p, DROP_RTR_ROUTE_LOOP);
}

This is where the original code ends. It runs fine unless the data rate is high. When the packets are transferred at a significantly high rate, it causes some problems. So, the last segment of the code has been modified like the following. It works for me though I could not guarantee that it will be fine in other means.

if (malicious == true ) {
drop(p, DROP_RTR_ROUTE_LOOP);
return ;
}

Process on how to add trust table in NS2.

I am assuming AODV protocol. In rtable.cc add below code


trust_entry::trust_entry()
{
   //Initialize as per your need.
}
trust_entry::~trust_entry()
{
  //Deconstruct as per your need.
}

trust_entry* trust_store::trust_lookup(
nsaddr_t node_id)
{
     trust_entry *rp = trusthead.lh_first;
     for (; rp; rp = rp->trust_link.le_next) {
             if (rp->node_id == node_id)
                 break;
     }
    return rp;
}
void trust_store::trust_delete(
nsaddr_t node_id)
{
    trust_entry *rp = trust_lookup(node_id);

    if (rp)
    {
        LIST_REMOVE(rp, trust_link);
        delete rp;
    }

}

trust_entry*
trust_store::trust_insert(
nsaddr_t node_id, nsaddr_t prev_node,nsaddr_t next_node,int32_t trust_value)
{
    trust_entry *rp;
    //assert(tr_lookup(dst_seq_no) == 0);
    rp = new trust_entry;
    assert(rp);
    rp->node_id = node_id;
    rp->prev_node = prev_node;
    rp->next_node = next_node;
    rp->trust_value = trust_value;
    LIST_INSERT_HEAD(&trusthead, rp, trust_link);
    return rp;
}

trust_entry* trust_store::trust_update(
nsaddr_t node_id,nsaddr_t prev_node,nsaddr_t next_node, int32_t trust_value)
{    trust_delete(node_id);
    trust_insert(node_id,prev_
node,next_node,trust_value);
}
In rtable.h add below code


class trust_entry
{
    friend class AODV;
    friend class trust_store;
public:
    trust_entry();
    ~trust_entry();
    nsaddr_t node_id;
    nsaddr_t prev_node;
    nsaddr_t next_node;
    int32_t trust_value;
protected:
    LIST_ENTRY(trust_entry) trust_link;
};

class trust_store
{

public:
    trust_store()
    {
        LIST_INIT(&trusthead);
    }
    trust_entry* head()
    {
        return trusthead.lh_first;
    }
    trust_entry* trust_insert(nsaddr_t node_id,nsaddr_t prev_node,nsaddr_t next_node,int32_t trust_value);
    trust_entry* trust_lookup(nsaddr_t node_id);
    void trust_delete(nsaddr_t node_id);
    trust_entry* trust_update(nsaddr_t node_id,nsaddr_t prev_node,nsaddr_t next_node, int32_t trust_value);
private:
    LIST_HEAD(trust_head, trust_entry) trusthead;
};

while using in aodv code i.e. aodv.cc add below code to aodv.h

trust_store             tstore;
and if u want to access functions for adding route entry in aodv.cc then add below code in aodv.cc
tstore.trust_insert(node_id,prev_node,next_node,trust_value);
Note:- replace above four parameters with your own. Like wise u can access update, delete and lookup.

All the best!


Simple Blackhole attacks

Blackhole Attacks on NS-2


What is blackhole attacks ??
Black-hole attack: malicious node sends a forged RREP packet to a source node that initiates  the route discovery in order to pretend to be a destination node itself or a node of immediate neighbour the destination. Source node will forward all of its data packets to the malicious node; which were intended for the destination.
We will apply a simple blackhole attack in AODV. following the scenario illustration
For apply this attacks, we have to modify file aodv.cc, aodv.h inside the protocol. folowing the pseudocode in c++
Blackhole always say that have the route to be a sink.
else if ((rt && blackhole == 1)) {
    assert(rq> rq_dst == rt> rt_dst);
    sendReverse(rq> rq_src);
    rt> pc_insert(rt0> rt_nexthop);
    rt0> pc_insert(rt> rt_nexthop);
    Packet::free(p);}
Next i will write complete version.

Saturday 1 November 2014

Andrew Wiles on Solving Fermat

A kind of will power to do anything. Really nice Andrew Sir

Andrew Wiles devoted much of his career to proving Fermat's Last Theorem, a challenge that perplexed the best minds in mathematics for 300 years. In 1993, he made front-page headlines when he announced a proof of the problem, but this was not the end of the story; an error in his calculation jeopardized his life's work. In this interview, Wiles recounts how he came to terms with the mistake, and eventually went on to achieve his life's ambition.
Andrew Wiles being interviewed Anyone who thinks that mathematics doesn't involve passion and emotion should hear directly from Andrew Wiles. : © WGBH Educational Foundation

A childhood dream

NOVA: Many great scientific discoveries are the result of obsession, but in your case that obsession has held you since you were a child.

ANDREW WILES: I grew up in Cambridge in England, and my love of mathematics dates from those early childhood days. I loved doing problems in school. I'd take them home and make up new ones of my own. But the best problem I ever found, I found in my local public library. I was just browsing through the section of math books and I found this one book, which was all about one particular problem—Fermat's Last Theorem. This problem had been unsolved by mathematicians for 300 years. It looked so simple, and yet all the great mathematicians in history couldn't solve it. Here was a problem, that I, a 10 year old, could understand, and I knew from that moment that I would never let it go. I had to solve it.

Who was Fermat and what was his Last Theorem?

Fermat was a 17th-century mathematician who wrote a note in the margin of his book stating a particular proposition and claiming to have proved it. His proposition was about an equation which is closely related to Pythagoras' equation. Pythagoras' equation gives you:
x2 + y2 = z2
You can ask, what are the whole number solutions to this equation, and you can see that:
32 + 42 = 52
and
52 + 122 = 132
And if you go on looking then you find more and more such solutions. Fermat then considered the cubed version of this equation:
x3 + y3 = z3
He raised the question: Can you find solutions to the cubed equation? He claimed that there were none. In fact, he claimed that for the general family of equations:
xn + yn = zn where n is bigger than 2
it is impossible to find a solution. That's Fermat's Last Theorem.

So Fermat said because he could not find any solutions to this equation, then there were no solutions?

He did more than that. Just because we can't find a solution it doesn't mean that there isn't one. Mathematicians aren't satisfied because they know there are no solutions up to four million or four billion. They really want to know that there are no solutions up to infinity. And to do that we need a proof. Fermat said he had a proof. Unfortunately, all he ever wrote down was: "I have a truly marvelous demonstration of this proposition which this margin is too narrow to contain."

What do you mean by a proof?

In a mathematical proof you have a line of reasoning consisting of many, many steps, that are almost self-evident. If the proof we write down is really rigorous, then nobody can ever prove it wrong. There are proofs that date back to the Greeks that are still valid today.
"I really believed that I was on the right track, but that did not mean that I would necessarily reach my goal."

So the challenge was to rediscover Fermat's proof of the Last Theorem. Why did it become so famous?

Well, some mathematics problems look simple, and you try them for a year or so, and then you try them for a hundred years, and it turns out that they're extremely hard to solve. There's no reason why these problems shouldn't be easy, and yet they turn out to be extremely intricate. The Last Theorem is the most beautiful example of this.

But finding a proof has no applications in the real world; it is a purely abstract question. So why have people put so much effort into finding a proof?

Pure mathematicians just love to try unsolved problems—they love a challenge. And as time passed and no proof was found, it became a real challenge. I've read letters in the early 19th century which said that it was an embarrassment to mathematics that the Last Theorem had not been solved. And of course, it's very special because Fermat said that he had a proof.

On Fermat's Trail

How did you begin looking for the proof?

In my early teens I tried to tackle the problem as I thought Fermat might have tried it. I reckoned that he wouldn't have known much more math than I knew as a teenager. Then when I reached college, I realized that many people had thought about the problem during the 18th and 19th centuries and so I studied those methods. But I still wasn't getting anywhere. Then when I became a researcher, I decided that I should put the problem aside. It's not that I forgot about it—it was always there—but I realized that the only techniques we had to tackle it had been around for 130 years. It didn't seem that these techniques were really getting to the root of the problem. The problem with working on Fermat was that you could spend years getting nowhere. It's fine to work on any problem, so long as it generates interesting mathematics along the way—even if you don't solve it at the end of the day. The definition of a good mathematical problem is the mathematics it generates rather than the problem itself.

It seems that the Last Theorem was considered impossible, and that mathematicians could not risk wasting getting nowhere. But then in 1986 everything changed. A breakthrough by Ken Ribet at the University of California at Berkeley linked Fermat's Last Theorem to another unsolved problem, the Taniyama-Shimura conjecture. Can you remember how you reacted to this news?

It was one evening at the end of the summer of 1986 when I was sipping iced tea at the house of a friend. Casually in the middle of a conversation this friend told me that Ken Ribet had proved a link between Taniyama-Shimura and Fermat's Last Theorem. I was electrified. I knew that moment that the course of my life was changing because this meant that to prove Fermat's Last Theorem all I had to do was to prove the Taniyama-Shimura conjecture. It meant that my childhood dream was now a respectable thing to work on. I just knew that I could never let that go.

So, because Taniyama-Shimura was a modern problem, this meant that working on it, and by implication trying to prove Fermat's Last Theorem, was respectable.

Yes. Nobody had any idea how to approach Taniyama-Shimura but at least it was mainstream mathematics. I could try and prove results, which, even if they didn't get the whole thing, would be worthwhile mathematics. So the romance of Fermat, which had held me all my life, was now combined with a problem that was professionally acceptable.

Keeping a secret

At this point you decided to work in complete isolation. You told nobody that you were embarking on a proof of Fermat's Last Theorem. Why was that?

I realized that anything to do with Fermat's Last Theorem generates too much interest. You can't really focus yourself for years unless you have undivided concentration, which too many spectators would have destroyed.

But presumably you told your wife what you were doing?

My wife's only known me while I've been working on Fermat. I told her on our honeymoon, just a few days after we got married. My wife had heard of Fermat's Last Theorem, but at that time she had no idea of the romantic significance it had for mathematicians, that it had been such a thorn in our flesh for so many years.
"There's no problem that will mean the same to me."

On a day-to-day basis, how did you go about constructing your proof?

I used to come up to my study, and start trying to find patterns. I tried doing calculations which explain some little piece of mathematics. I tried to fit it in with some previous broad conceptual understanding of some part of mathematics that would clarify the particular problem I was thinking about. Sometimes that would involve going and looking it up in a book to see how it's done there. Sometimes it was a question of modifying things a bit, doing a little extra calculation. And sometimes I realized that nothing that had ever been done before was any use at all. Then I just had to find something completely new; it's a mystery where that comes from. I carried this problem around in my head basically the whole time. I would wake up with it first thing in the morning, I would be thinking about it all day, and I would be thinking about it when I went to sleep. Without distraction, I would have the same thing going round and round in my mind. The only way I could relax was when I was with my children. Young children simply aren't interested in Fermat. They just want to hear a story and they're not going to let you do anything else.

Alone and in the dark

Usually people work in groups and use each other for support. What did you do when you hit a brick wall?

When I got stuck and I didn't know what to do next, I would go out for a walk. I'd often walk down by the lake. Walking has a very good effect in that you're in this state of relaxation, but at the same time you're allowing the sub-conscious to work on you. And often if you have one particular thing buzzing in your mind then you don't need anything to write with or any desk. I'd always have a pencil and paper ready and, if I really had an idea, I'd sit down at a bench and I'd start scribbling away.

So for seven years you're pursuing this proof. Presumably there are periods of self-doubt mixed with the periods of success.

Perhaps I can best describe my experience of doing mathematics in terms of a journey through a dark unexplored mansion. You enter the first room of the mansion and it's completely dark. You stumble around bumping into the furniture, but gradually you learn where each piece of furniture is. Finally, after six months or so, you find the light switch, you turn it on, and suddenly it's all illuminated. You can see exactly where you were. Then you move into the next room and spend another six months in the dark. So each of these breakthroughs, while sometimes they're momentary, sometimes over a period of a day or two, they are the culmination of—and couldn't exist without—the many months of stumbling around in the dark that proceed them.

And during those seven years, you could never be sure of achieving a complete proof.

I really believed that I was on the right track, but that did not mean that I would necessarily reach my goal. It could be that the methods needed to take the next step may simply be beyond present day mathematics. Perhaps the methods I needed to complete the proof would not be invented for a hundred years. So even if I was on the right track, I could be living in the wrong century.
Andrew Wiles at blackboard For eight years, Wiles was utterly obsessed with the challenge of Fermat's Last Theorem. Enlarge Photo credit: © WGBH Educational Foundation

A Fitful breakthrough

Then eventually in 1993, you made the crucial breakthrough.

Yes, it was one morning in late May. My wife, Nada, was out with the children and I was sitting at my desk thinking about the last stage of the proof. I was casually looking at a research paper and there was one sentence that just caught my attention. It mentioned a 19th-century construction, and I suddenly realized that I should be able to use that to complete the proof. I went on into the afternoon and I forgot to go down for lunch, and by about three or four o'clock, I was really convinced that this would solve the last remaining problem. It got to about tea time and I went downstairs and Nada was very surprised that I'd arrived so late. Then I told her I'd solved Fermat's Last Theorem.

The New York Times exclaimed "At Last Shout of 'Eureka!' in Age-Old Math Mystery," but unknown to them, and to you, there was an error in your proof. What was the error?

It was an error in a crucial part of the argument, but it was something so subtle that I'd missed it completely until that point. The error is so abstract that it can't really be described in simple terms. Even explaining it to a mathematician would require the mathematician to spend two or three months studying that part of the manuscript in great detail.

Eventually, after a year of work, and after inviting the Cambridge mathematician Richard Taylor to work with you on the error, you managed to repair the proof. The question that everybody asks is this; is your proof the same as Fermat's?

There's no chance of that. Fermat couldn't possibly have had this proof. It's 150 pages long. It's a 20th-century proof. It couldn't have been done in the 19th century, let alone the 17th century. The techniques used in this proof just weren't around in Fermat's time.

So Fermat's original proof is still out there somewhere.

I don't believe Fermat had a proof. I think he fooled himself into thinking he had a proof. But what has made this problem special for amateurs is that there's a tiny possibility that there does exist an elegant 17th-century proof.

A melancholy triumph

So some mathematicians might continue to look for the original proof. What will you do next?

There's no problem that will mean the same to me. Fermat was my childhood passion. There's nothing to replace it. I'll try other problems. I'm sure that some of them will be very hard and I'll have a sense of achievement again, but nothing will mean the same to me. There's no other problem in mathematics that could hold me the way that this one did. There is a sense of melancholy. We've lost something that's been with us for so long, and something that drew a lot of us into mathematics. But perhaps that's always the way with math problems, and we just have to find new ones to capture our attention. People have told me I've taken away their problem—can't I give them something else? I feel some sense of responsibility. I hope that seeing the excitement of solving this problem will make young mathematicians realize that there are lots and lots of other problems in mathematics which are going to be just as challenging in the future.
"My mind is now at rest."

What is the main challenge now?

The greatest problem for mathematicians now is probably the Riemann Hypothesis. But it's not a problem that can be simply stated.

And is there any one particular thought that remains with you now that Fermat's Last Theorem has been laid to rest?

Certainly one thing that I've learned is that it is important to pick a problem based on how much you care about it. However impenetrable it seems, if you don't try it, then you can never do it. Always try the problem that matters most to you. I had this rare privilege of being able to pursue in my adult life, what had been my childhood dream. I know it's a rare privilege, but if one can really tackle something in adult life that means that much to you, then it's more rewarding than anything I can imagine.

And now that journey is over, there must be a certain sadness?

There is a certain sense of sadness, but at the same time there is this tremendous sense of achievement. There's also a sense of freedom. I was so obsessed by this problem that I was thinking about it all the time—when I woke up in the morning, when I went to sleep at night—and that went on for eight years. That's a long time to think about one thing. That particular odyssey is now over. My mind is now at rest.

This feature originally appeared on the site for the NOVA program The Proof.