I think I may have an idea for the problem this week. Who likes "Craps?" I will work on the specifics, and think of some additional what-ifs as well.
lol half the people on social.quodverum.com blocked me in a thread where i basically said "dems are bad but orange man bad too"... everyone lost their shit and half of them blocked me in the throws of their temper tantrum.
For an instance whose whole purpose is "words only hurt weak people" they are suprisingly easily hurt by words.
caps. best news in years. v. good personal poast.
@mngrif lolool "There are aggressive wasps in our products, this is a top priority for us right now" lolololololol omg lol
caps. best news in years. v. good personal poast.
@mngrif I just picture people opening random UPS boxes and a swarm of hungry wasps coming forth.. then them calling the customer service "Yea sorry this is a known issue with the product line right now, we have a technician working on it" as you hear screams from little children in the background as they flee.
In case you are wondering why I have 4.7K followers and only 182 follows, here is my policy:
If you follow me, you post at least once a week, and you interact with me directly and respectfully from time to time, regardless of your opinions, I will usually follow you.
I have no interest from most people to hear what they have to say and make that a one-way endeavor. So i usually follow people who will engage in enjoyable conversations, and i gain more enjoyment from a difference of opinion than people who agree a bit too readily. So I often have people I follow who do not represent my own views, but are otherwise respectful.
If you regularly use racial slurs or attacks at entire groups of people (black, white, green, doesn't matter the group) I will unfollow you usually. If you are antagonistic and misrepresent other peoples stated intentions, I will unfollow you. If your account hasnt posted anything in more than a month, I will unfollow you. If you exhibit political dogma, religious dogma or dogma of any kind I will likely unfollow you, but with the note that I do appreciate religiously or politically active people who do not exhibit dogma in their reasoning. This last point (dogma) is more a pet peeve to me than anything offensive.
Try to write your program before reading this - it also covers the arbitrary-set case.
How's this look?
def N(x):
if (x < 0):
return 0
if (x == 0 or x == 1):
return 1
return N(x-1) + N(x-2)
def N135(x):
if (x < 0):
return 0
if (x == 0):
return 1
return (N135(x-1) + N135(x-3) + N135(x-5))
def NArr(x, arr):
if (x < 0):
return 0
if (x == 0):
return 1
return sum([NArr(x - i, arr) for i in arr])
def main():
for n in range(10):
print(n, N(n))
for n in range(10):
print(n, N135(n))
for n in range(10):
print(n, NArr(n, [1,3,5]))
if __name__ == "__main__":
main()
Thank you for your recent comments.
You refer to the EU as a ‘consolidated power’. In a sense this is true, but so too is the USA. (I lived in Nevada for over two-and-half years – now threatened by climate change - the Colarado river, Lake Mead etc.) What matters is the history that led to its creation and provides its fundamental raison d’etre. In the case of the EU, this ultimately is not trade, but the prevention of war in wider Europe which was the cockpit of two devasting conflicts. My grandfather, along with a number of uncles as well as my late wife’s father who was born in British Guiana (as then known) in South America, put their lives on the line to defeat fascism. The latter has never gone away and in recent years has re-emerged from the shadows wearing the mask of ‘populism’ i.e. ‘the will of the people’ etc.
The desire to prevent another world war starting in Europe lies at the heart of the Treaty of Rome and was underwritten by the four freedoms enshrined in it – namely the freedom of movement of goods, services, capital and persons. Me, I believe that the ‘four freedoms’ should be extended globally. To that end, I think that all countries should aim to dismantle border controls and make ‘passports’ a thing of the past. I also believe in free markets rather than ‘command height economies’ (e.g. former USSR), However, most free markets are not fair because they are rigged (cartels and monopolies) and most regulatory bodies are stuffed with industry insiders and, for that reason alone, can never be effective. But there are many other freedoms that need to be enshrined in international law. For example, the right to privacy, the right to cognitive liberty (including ending the so-called ‘War on Drugs’), the right to freedom from poverty (Basic Income to replace means-tested state benefits). I also believe that 14-year-olds should be given the vote. And so on and so forth…
The EU is confronting many problems. It needs to undergo serious reforms. However, at the end of the day, I believe it to be an heir of the Renaissance and the Enlightenment. Compared to the ridiculous shenanigans at Westminster in recent years, it is a beacon of civility and serious forward-thinking. Yes, it makes mistakes. Yes, it is occasionally overbearing. However, its sins are trivial when compared to those of national governments. Paradoxically, Brexit has strengthened rather than weakened its hand. In the Netherlands those in favour of remaining in the EU stands at roughly 72% even though the population is increasingly confused on the subject. Many countries are seeking to join the Union (Bosnia, Moldova, Albania and indeed, still, Turkey). I understand that multi-lateralism is anathema to Trump and Putin, but to be honest, that’s their problem, not mine.
Finally, while I agree that if the UK were to leave the EU without a deal, new trade deals would take place, they would be slow in the making and leave the UK significantly worse off. You don’t need to believe me, you just need to poll any reasonably informed person in the Commonwealth, Japan, Far East Asia or the Antipodes!
Best (me – “just relaxed and paying attention” (or trying to))!
Try to write your program before reading this - it also covers the arbitrary-set case.
Okay, so with all that, here is the actual longhand using the permutations, but I am not sure how to handle this if I passed an array of numbers like in the 1,3,5 example
def NFact(x):
def fact(x):
_fact = 1
for i in range(1, x+1):
_fact = _fact * i
return _fact
def r_NFact(num):
twos = x - num
ones = x - (2 * twos)
if ones < 0:
return 0
return r_NFact(num - 1) + ( fact(num) // (fact(ones) * fact(twos)))
return r_NFact(x)
Some cool science learned from Zebras.
Jeffrey Phillips Freeman
Innovator & Entrepreneur in Machine Learning, Evolutionary Computing & Big Data. Avid SCUBA diver, Open-source developer, HAM radio operator, astrophotographer, and anything nerdy.
Born and raised in Philadelphia, PA, USA, currently living in Utrecht, Netherlands, USA, and Thailand. Was also living in Israel, but left.
Pronouns: Sir / Mister
(Above pronouns are not intended to mock, i will respect any persons pronouns and only wish pronouns to show respect be used with me as well. These are called neopronouns, see an example of the word "frog" used as a neopronoun here: http://tinyurl.com/44hhej89 )
A proud member of the Penobscot Native American tribe, as well as a Mayflower passenger descendant. I sometimes post about my genealogical history.
My stance on various issues:
Education: Free to PhD, tax paid
Abortion: Protected, tax paid, limited time-frame
Welfare: Yes, no one should starve
UBI: No, use welfare
Racism: is real
Guns: Shall not be infringed
LGBT+/minorities: Support
Pronouns: Will respect
Trump: Moron, evil
Biden: Senile, racist
Police: ACAB
Drugs: Fully legal, no prescriptions needed
GPG/PGP Fingerprint: 8B23 64CD 2403 6DCB 7531 01D0 052D DA8E 0506 CBCE