Me, an addlepate.!

Sunday, 29 March 2020

Technical DP
March 29, 20201 Comments

DYNAMIC PROGRAMMING



O verview


Dynamic programming(DP) is a general, powerful algorithm design technique coined by American mathematician Richard Belman. Its heavily used in graphs, AI, ML, and many more difficult sounding fields and areas.Used to cut down the time-consuming techniques for solving a program. Basically,

                  Dynamic = time varying aspect of the problem
                 Programming(British English) = optimization(American English)


So we can say dynamic problem = careful brute force method



DP  = Subproblems + "Reuse"


That is to say, dividing the problems into subproblems and reusing the method used once to solve the subproblems again and again thus maintaining efficiency and accuracy.






U nderstanding with an example



Let's take the example of Fibonacci Numbers.Before reading forward try to write an algorithm to generate the sum of the ‘n’ Fibonacci numbers in a recursive manner,, n being inclusive.




We all already know F1 = F2 =1 and Fn=Fn-1 + Fn-2

Now there can be 2 methods of solving the problem,





NAIVE RECURSIVE ALGORITHM
MEMOIZED DP ALGORITHM
fib(n):
memo={}
if(n<=2): f=1
fib(n):
else f= fib(n-1)+fib(n-2)
If n is in memo : return memo[n]
return f;
if(n<=2) : f=1

else f= fib(n-1)+fib(n-2)

memo[n]=f

return f


The first naive method is very obvious and time consuming while the other makes use of memoization. Its nothing but remembering all that has been done before or simply memorizing.







C onclusion



Thus, our previous formula can be further refined to,



DP =Recursion+ Memoization +
Guessing




                 Recursion as is exponential by own and is used again again
                 Memoization is to remember and reuse the solution to subproblemsGuessing as to figure out what should be used, try all guesses and take the best one.


That provide us with the basic idea of DP and we are now a little familiar with this amazing and efficient problem solving approach.


By Shivangi Tiwari


Reading Time:
Letter to the person who lost me.
March 29, 2020 2 Comments
Dear lost-lover,

Hello, it's me. They say that time's supposed to heal, yeah...But I ain't done much healing. Hahaha, you know what I mean, don't you?

Yesternight you finally came in my dreams, it was you and me together close to each other what else do I want more? You wore your pink tee and you looked as good as you always do. Who says pink doesn't look good on boys you looked perfect (: But you know what we were fighting again and I was really upset that no matter how I hard I try we always end up like this, I wanted to look into your eyes as if I was telling you to just stop and look into mine too. They speak more than my words. Why haven't you recognized until now that I'm NOT impassive I might be unexpressive though. Those moments of helplessness when I couldn't give it to you what you really mean, what you have meant to me until now were purely wicked. Suddenly a teardrop rolled down my eye and I couldn't take it anymore. It suddenly reminded me of how I've been so unlucky with the matters of heart, always a carnage it was. And, again this time a didn't want the same to happen again. I wanted you to feel special at that moment that see I don't say but I mean, I know it's hard to understand but I love you, I always had unlike if you ever did or didn't. I love you. I don't say but my heart knows it. And then you know what happened? You looked at me and said I know you didn't hurt me intentionally and smiled at me by saying that you were sorry! I smiled back and then I climbed up to your lap and we hugged. We hugged! As tight as I could to never let you go again!!
That's it that was the dream. Then I had another dream about me visiting my psychologist and trying to explain it to her what makes me sad and tired. She laughed at me saying that it is absolutely insane you are making excuses and I remember I hyperventilated and couldn't speak more.

Then I woke up.

They say we dream about the things we desire for or feelings that were repressed for so long that our brain decides to finally live them. I dreamt about you and you were on my mind from so long, I knew we were not going to end together and that's why the reluctance I was showing was finally overtaken my brain to give me that love I wanted. Who says love is a matter of the heart? Love is a matter of brains. I stopped at the part where we were together and my brain made us inseparable at least in that dream of mine.

I'm writing it down because I want to immortalize it somewhere in the time, a part of me, broken but was loved with full measure at those pretty moments, I'll cherish them. 


So, we had issues I complained that you never said what you meant and you complained that I never meant what I said! Had we been together may be face to face we would have just hugged each other and all those misunderstandings would have vanished just like that. You see, sometimes people are not always what they say, there's so much to them. I'm a galaxy of stars and so are you but we are so so far away. Between us lays a vastness of nothingness. When we collide maybe after an epoch we would merge with demolition but the result would be a beautiful majesty of us together. But, again that ain't gonna happen. Love is not just about physical intimacy, brain to brain connection is what it seeks to make its roots strong. It's about understanding the fathoms of things we don't say. Its like music if we don't play the right notes it will always sound unpleasant to ears no matter how good we are alone. And to play together we need to give each other space, we need to tell them that I believe in you that you'll make it right, you to show that you trust them.

So, my dear irrespective of whether you loved me back or not, you ever understood me or not, you ever valued me or not all I wish to say my love was pure. And if love comes at the cost of self-respect and peace we should leave that no matter how heart-wrenching it is. Thus now I bid you a farewell into the tunnel of time and may we never meet again. At least we are made of the same star-dust (:

Yours lovingly,
Me <3


























Reading Time:

Thursday, 13 February 2020

February 13, 20200 Comments
What the hell am I doing here?

I don’t belong here 
These lines from ‘creep’ don’t leave my mind to which I guess that’s because I relate to them
so much.It’s like I’m stuck and I’ll never get that threshold ever to get out of all this and I feel like I won’t be able to make it up after the doomsday which is soon to come.



Run, run, run, run, run but how far will I go I’m no super Mario that runs with indefinite speed, I’ll stumble and soon fall and fall so hard that I’ll almost break my jaws, my head will get damned almost losing my consciousness.When I’ll try to get up I’ll look at my bruised hands super red as they get always with blood oozing out of them and after that I’ll somehow manage to walk again only to realize the road starts to melt like quick-sand, but slowly it’ll take me into it and swallow me into some other monochromatic surrounding, this time I’ll fall over brittle pieces of glasses, piercing all my body, it would be hard for me to even realize which part pains the most.When I’ll look up everything will be black and white, no colours, nothing just jet black and grayscale white. This is so eye pricking, I’ll start walking somehow again, I’ll walk for 7 miles continuously without any person near me, quenching like anything. Finally, I’ll see a river and running to it I’ll desperately try to drink only to find it its all black and that blackness is covering me, my body and now I’m pitch black and what I see right in front of me is emptiness, nothing is above me or below me just nothingness all over.
Oh, I knew its gonna happen and within a second I see galaxies with enormous beauties just in front me just as majestic they seem equal are they unrewarding. But wait for some time, shut up for a while wow! It’s all so undescribable I want to close my eyes and think about it. Suddenly again, all the anxieties hit me things I was running away are here again in front of me.
What the fuck! What the fucking fuck! We’re fucking humans in an Earth in a fucking small part of a fucking smaller galaxy we even have a black hole heavier and larger than our sun, larger than a whole galaxy, there are so many goddamn galaxies with so many other creepy similar creatures or different who cares! We won’t be able to discover that until I’m alive. Why do we have to worry about out problems there’s so much to existential crisis what should I pay more attention to, the fact that we can die by a single gamma-ray burst or any other fucking asteroid striking us at any fucking moment or to the anxieties I have about my sustainability in this society, about the fact that whether I will be able to afford my wages or not why the hell am I so average what is wrong with me?

I don’t want to try or I’m done trying? Is this me writing all of it or some of my personalities do I need medical help? This is so fucking common today that being disturbed is treated as normal so when should I see a psychiatrist now? How will I afford the fees? Suicide is a viable option? I guess so but then again how will this in the seven hells pay my parents back what they invested in me so it's useless, ditch it. I don’t even need to trip I feel high all the time I still do feel the need of intoxicating the shit out of me and again that shit doesn’t stay for long it goes away I jump, run, dance the shit out of it.
I want to do all of it but without feeling like an asshole what the hell is this life getting up with recklessness in my minds, hardly had I received a good sleep since 6 7 years what do I do now? I have tried so many things what now? I feel so stupid talking to people, I want to tell anyone who comes in front of me everything I feel but guess what no one talks to me yeah right they think I’m a jerk well, that’s what I have experienced till now no one gives a shit, they don’t care why would they fuck them actually, whatever.
Guess what you are trapped too, lurking your way out of all this by watching some random shit series or surfing shitty social media or some other high-level bullshit I don’t care actually it’s so shitty and I feel bad for the good side of me who works her ass out and then there is me the bad side who spoils all of it, everything to gloominess and shit.


Reading Time:

Thursday, 24 October 2019

Is depression really that casual?
October 24, 20190 Comments
Every now and then we see people discussing their anxieties about life and love. Haven't we methaphorized such heavy words with even the smallest pain we feel. Clearly its an alarming condition in one's life which seems to stay for an epoch. I guess some credit goes to the internet age as well.
I felt the urge to write on it because I've been in a similar situation and I want the people to get a reality check. I'm going to give strong reviews so you may want to discontinue if you are sensitive towards such discussions.



WHAT REALLY DEPRESSION IS?

  • As per WHO depression is a common mental disorder, characterized by persistent sadness and a loss of interest in activities that you normally enjoy, accompanied by an inability to carry out daily activities, for at least two weeks.
  • In addition, people with depression normally have several of the following: a loss of energy; a change in appetite; sleeping more or less; anxiety; reduced concentration; indecisiveness; restlessness; feelings of worthlessness, guilt, or hopelessness; and thoughts of self-harm or suicide.
  • There is a chance that every one in four-person will undergo depression at some time in their lives. Depression is a serious matter of concern and shouldn't be taken as a joke.

So the question arises why is it so trendy nowadays? I guess first and foremost,

LACK OF KNOWLEDGE AMONG PEOPLE

I'll ask openly here, how many times were you dead sure in your life that you were in a depression and discussed it with the people near you rather than posting about it on social media? 
 Let's be honest, do you know the exact definition of depression, anxiety, insomnia, panic attacks? We are heavily misguided by the trends rising by leaps and bounds about such things that we automatically assume other people's definition of such sensitive cases are true. 
It's sad that even now in countries like India there's no proper education system for dealing with mental health. There are health camps set up every year in our schools to get a full body checkup but sadly nothing is done to treat the mental issue which we face at such a tender age. 
Stop, take a day and ask yourself is this really what you think it is or you are covering up with those jargons? and what are you doing to spread awareness?



BECAUSE EVERYONE IS HAVING IT MAYBE ITS THE NEW TREND

Seriously is this the new trend? 
You know what its been in trend from quite a while. I've been active on social media from almost ten years and I've realised that from the very beginning people started posting sadistic content and memes from there only and it became popular culture because everyone can relate to it and then to rather ostentatiously show off social media skills people adopted such lifestyles.
Don't you hear every other person saying that I'm depressed posting about all this on social media? However some people are so obsessed with it that they really don't care what other person thinks about it they are utterly comfortable with this and are so used to it that their whole timeline is full of all this content however the sad part is that they fail to provide the solution to the problems and keep on consistently posting about it. 
Sorry to say but it sounds funny to them(that is what I feel) and they satisfy themselves that this will solve the problem at least for some time.



SOMEWHERE OR THE OTHER WE ARE COMFORTABLE WITH IT

Time for a quick update lets clear all the myths,

distress v/s depression

Suppose a person lets say A has given the paper of IIT-JEE and he failed to qualify the set criteria for passing the exam then he became extremely anxious, he left eating, didn't socialize after that, and started undervaluing himself. No doubt, there was a sheer pressure on him not only of his family's expectations but also of his expectations from himself and he has failed everyone. Now, this scenario is very common among Indian teens but the question is what we do after this?
See, we need to understand that at the first time its clearly a matter of distress and if not taken care of it can advance itself to depression. We need to identify and know the difference between the two. Most of the people tend to commit suicide after such heart-wrenching incidents but is it really worth it? Is your life so cheap that it got sold out by you failing at a single test in your life?
The simple and bitter answer to it is, analyze yourself and ask yourself did you gave your 100% and if you gave are you not happy that you tried? maybe god has a better plan for you or maybe he wants you to do more of what you think you can do!


net freakiness v/s insomnia

Don't deny that you have never used the phrase, 'OH! I'm suffering from insomnia.'
I bet you have, even I say that so often. And, the reason is quite obvious because insomnia = I can't sleep.

  •  Well actually, anxiety, stress, and depression are some of the most common causes of chronic insomnia. Having difficulty sleeping can also make anxiety, stress, and depression symptoms worse. 
  • Other common emotional and psychological causes include anger, worry, grief, bipolar disorder, and trauma. What we really tend to do when we can't sleep or do we really wish to sleep even? 
We all want to complete that god damn series or its really important to talk to my boyfriend because of the misunderstanding that happened today morning? Isn't it the fact? and you call this insomnia.*sigh!* its not insomnia it's your addiction to the things you are doing which has the authority to preempt your sleep, however, these tasks are non-preemptive (such an irony).


nervousness v/s anxiety


I can give you anxieties dude. 
How often do you come across this statement in some or the other person's bio. Guys, do you even know what anxiety is?
Its something similar to losing your consciousness and it might lead to death its the next level of nervousness.
 So is that anxiety thing still cool? unpopular opinion: no, not at all. We all tend to get nervous, that stomach discomfort that slightly raised heartbeat that's nervousness.
 Agreed to the fact that some people have a weak heart and tend to get a panic attack and anxiety at some serious condition which isn't according to us but can we stop calling it so casually for the sake of its solemnity.

INTERNET IS OVERPOWERED WITH SUCH SPEAK YOUR DEPRESSION OUT THING

It's quite visible that people are constantly posting on social media to speak your heart out things and that is the sole reason people are coming out and saying whatever they feel like. I guess its good upto some extent and thats really helping out the people who need help but somewhere or the other its making us lose our ability to understand the situation and think rationally. Our lives are not a joke that we tell everything about it, to people around us. This is affecting us so badly that we have lost communication with parents, the people who can really help us out through this all.


WE TEND TO GET COMFORTABLE IN ALL THIS 

Let's face it we are all lazy beings and we want quick solutions to all our problems in one go. How do you get it?

  1. Say to yourself that you need help when you failed at a task.
  2. Don't do anything to solve the problem.
  3. Post about it on the internet and tell people that you got depression because things aren't working out and you can't work on them because of course, you got depression!
  4. Watch some youtube motivational videos, read some memes and don't forget to download some really hit quotes on depression from Pinterest and set them as your statuses and profile pictures.
  5. Say that I'm anxious, insomniac and depressed to every other person you talk to.
  6. Start believing in that.
  7. Voila! you are good to go.
Guys, no kidding now. There are some people who really need help and we need to get aware of all that and help the people who really need that.
Depression is not a joke.
Depression is real.
I've been through it and I've seen it all the mental trauma and tendency to take one's life I've done that all and believe me it kills.
It's heartbreaking to be dependent on those anti-depressant pills.
I'm glad that popular faces are coming out and telling their tales of depression and are providing means to help you.


And for God's sake stop making it a trend. It's not COOL. Never was. Never will be.
And if you still feel that you are fighting depression then speak you heart out talk to the person close to you or if you still feel you can't talk about it with them go on for various websites dedicated to helping you or you can text me if you feel like I'll be happy to help. Trust me you are important and you need to realize that.
Here are some links 
LIVE LOVE LAUGH- https://thelivelovelaughfoundation.org/ 
VANDERVALA FOUNDATION- https://www.vandrevalafoundation.com/


Sources: Google, WHO, Pinterest, other persistent webistes on google. I take no credit of the picture, they are all from Pinterest.
Reading Time:

Wednesday, 23 October 2019

October 23, 20190 Comments
Howdy there!

I'm just another human just as you are, trying to live my life just as you are. Just dealing all the day to day stuff as you are. This is a formal introduction to my new visitors.

So who am I?
Oh, hi(awkward one)
I'm Shivangi Tiwari and  I'm currently an undergrad in IT from IET, LKO. 

What interests me?
I play keyboard, explore the depths of space and code.

What makes me different?
I'm an overthinker(LOL) I know most of us are but I guess I can use this to write IK most of the people don't pen down what they think but I do.

Why am I here?
  • Well, as I already told erstwhile I overthink. Again, a major reason is, I want everyone who is in a similar situation as me to relate with me as and with my blogs.
  • Another reason is I don't have friends so why not tell it out to introverts like me how I feel.
  • I've been battling depression from quite a time and I want to stand up for people like me with audacity.!
I guess that's enough for this session. :P
Reading Time:

@way2themes