# Anything discussion

9 views
maths > algorithms

message 1: by (new)

message 2: by (new)

https://youtu.be/oTTzNMHM05I

Knapsack Problem - Greedy Algorithm Method

Ever wanted to get maximum profit within fixed space for resources while being given different resources each with a different weight and Value?

This Method Is The One Used Mostly for Such evaluations...

Real Life Applications include To get the most out of the rest within the given system RAM consumption By a Browser...

message 3: by (new)

Mod
Rohit wrote: "https://youtu.be/oTTzNMHM05I

Knapsack Problem - Greedy Algorithm Method

Ever wanted to get maximum profit within fixed space for resources while being given different resources each with a differ..."

a good one!

message 4: by (new)

Rohit wrote: "https://youtu.be/oTTzNMHM05I

Knapsack Problem - Greedy Algorithm Method

Ever wanted to get maximum profit within fixed space for resources while being given different resources each with a differ..."

Is there any improved version of it for the case when object can't be in fraction?

message 5: by (new)

You sure do have sharp eyes Ajeet.
Yes, In Such A Case where we can't take fraction we either ignore object or take another object that fits the Capacity (without fractionating)....
This Is also called as 0/1 Knapsack Method which is Different from the normal knapsack...

message 6: by (new)

Hi, hope guys you are doing well. Wasn't active for a few days as I was busy finishing up my master's thesis.

message 7: by (new)

So a question came into my mind regarding Thanos's snap. What algorithm he would have used to erase 50% of the population? He would have a random number generator and decide to kill or leave depending upon if the number is even or odd. But any random numbers that we can generate are pseudorandom. As John von Neumann's puts it "Anyone who considers arithmetical methods of producing random digits is, of course, in a state of sin".
Considering this would it be better to use coin toss?
Or is there any better alternative?

message 8: by (new)

Mod
Ajeet wrote: "So a question came into my mind regarding Thanos's snap. What algorithm he would have used to erase 50% of the population? He would have a random number generator and decide to kill or leave depend..."

damn! a really good thought !! i don't think a coin toss would be a better option as how many times will he toss the coin?

"any random numbers that we can generate are pseudorandom." that's interesting to consider!

i guess first we have to consider exactly what thanos said he would kill 50% of all "life" on earth....... so for instance if we consider say for example number of land animals = number of water animals (which is not the actual case) then thanos might flip a coin and eliminate all animals of 1 type!

message 9: by (new)

Mod
or if he not dividing on the basis of species.... i guess we have to find 1st how machines generate (pseudo) random numbers

a machine takes a seed from an unpredictable source..... do some calculations with it..... and display a number in an order from it(say 3rd number) and thus a random number generates!

so can thanos' algo take a seed from time? (as modern computers do!)

message 10: by (new)

Krishna wrote: "or if he not dividing on the basis of species.... i guess we have to find 1st how machines generate (pseudo) random numbers

a machine takes a seed fro..."

Good points Krishna but remember Thanos wants to erase 50% people without any partiality, i.e. 50% of rich people, 50% of poor, 50% of every country, 50% people of every race should die. How can we account for that using random numbers?

message 11: by (new)

Mod
Ajeet wrote: "Krishna wrote: "or if he not dividing on the basis of species.... i guess we have to find 1st how machines generate (pseudo) random numbers

a machine ..."

ok so here is a thought.....

since here we are talking about randomly choosing life forms, we will have to consider a biological "seed" (like for random number generation, we choose a dynamic number generation system only)

so.... what is something that is common in all life? proteins? well it is.... but molecule is something constant in all life..... we need to find something which changes with time and present in every life form.....

signaling is something which is present in nearly all life forms...the signals do change with time because communication is different every time ....... so i wonder any particular property of the signal at the time of snap can be considered as the parameter which will generate fairly random choices.....

but one problem is there...... what about exactly 50% ?

message 12: by (new)

Mod
well for those (like me :| ) who don't like doing integration , here is a trick for u

message 13: by (new)

message 14: by (new)

Wish Had I Seen Those Before My Maths Exam.... :-(

message 15: by (new)

message 16: by (new)

Mod
okayyy..... an interesting one here

https://mathworld.wolfram.com/LightsO...

This is the "Lightsout" puzzle which is really fun to play

And those who wanna know the math behind it

message 17: by (new)