In John Steinbeck's novella Of Mice and Men, the marginalized character of Crooks, who is not allowed to room in the bunkhouse with the other workers but must sleep in the stable where he works, expresses the effects of his alienation,
"A guy goes nuts if he ain't got nobody....A guy sits alone....He can't turn to some other guy and ast him if he sees [something] too....He got nothing to measure by...."
Certainly, Hamlet is alone with his grief over his father, his disgust with his mother for remarrying so quickly--taking her huband's brother as her spouse at that--and alone with his deep musings and depressed introspection as well as in conflict with treacherous friends and corrupt courtiers. Truly, he has no one to turn to, either, and has little "to measure by" until Fortinbras appears in Act IV.
As a foil to Hamlet, the character of Fortinbras allows Hamlet, who has been looking through "a glass darkly," to perceive after his meeting with the Norweigan prince what course of action he himself must take. For, the noble Fortinbras sets upon a course at which he has little chance of success, but having vowed to avenge his father, he, nevertheless, courageously goes forward. In his high regard of this "delicate and tender prince," Hamlet remarks,
Witness this army, of such mass and charge,
Led by a delicate and tender prince,
Whose spirit with divine ambition puff'd....
Exposing what is mortal and unsure
To all that fortune, death, and danger dare,
Even for an eggshell. Rightly to be great
Is not to stir without great argument,
But greatly to find quarrel in a straw
When honour's at the stake. (4.4.49-58)
Thus, he is moved to action when he "measures" himself against Fortinbras. Perceiving his irresolution on a matter of even greater magnitude than that of Fortinbras, Hamlet is moved from theorizing and philosophizing to real action,
O, from this time forth,
My thoughts be bloody, or be nothing worth! (4.4.67-68)
Hamlet vows to avenge his father's murder, and to claim his rightful place in the Danish court, asserting, "This is I/Hamlet the Dane"(5.5.227-228). He engages in a duel with Laertes and pierces Claudius with the poisoned sword intended for him.
Therefore, regarding the composing of a thesis, the student can take the position that Hamlet, alone and isolated from the corrupt Danish court, finds himself irresolute and in despair. However, upon his meeting of the Norwegian prince, Fortinbras, Hamlet measures himself against his foil and is inspired by Fortinbras to take action. (This idea needs to be composed into a more direct statement, of course.)