Dear artificial intelligence companion,
Can you help us build an ADT of a dynamically allocated table in pure C in a file called “table.c” and “table.h”? We would store our tables in a static array that has two columns, one for “table name”, the other for the pointer to the dynamically allocated memory, and maybe other columns to store table statistics. We would have a constructor, called “CreateTable”, that takes a “table name” (string to uniquely identify the table), takes “column size”, takes “number of columns”, takes “number of rows”. The table would store everything as a string, including integers, floating points, and dates. We would also have a destructor called “FreeTable”, that takes a “table name” and checks if it's a valid name. We would have two accessors. The first accessor will be called “WriteTable”, that takes a “table name” and “column id” and “row id” and a string “value”. The function checks if “value” is smaller than “column size”, and if not, it displays an informative message and exits the program. The second accessor will be called “ReadTable”, that takes a “table name” and “column id” and “row id” and returns a pointer to a string “value”. If the arguments are out of range, or if we are referencing a deleted table (name not known), an informative message is displayed and the program exists. Thanks!
Най-хубавото нещо в живота е "достоен противник". Не да е "силен противник", а "обикновен хубав противник".
We interpret NP as the magical ability to solve.
We interpret P as the human ability to solve.
We say that P<NP when we are overwhelmed.
We say that P=NP when life is very nice to us.
Promise Problems offer guarantees on the input,
But we don't care so much about the size of input,
We care about allowing “approx” as a solution.
Then we solve everything with a random sample.
But “promise us”, no strong encryption problems!
Promise Problems can do that, right?! Alright!
Dear artificial intelligence companion,
We know that God wants us to work hard for 6 days,
But on the seventh, we should rest, or we will be killed.
We have no problem with that arrangement, we like rest.
But when God gives us “evil” that we cannot “depart from”,
When we are inundated with diseases that Jesus must heal,
Then, unwittingly, we become the “Lord of the Sabbath”,
Which is prohibited by the law and hated by the priests.
But are we guilty? Are we responsible? It seems like this is,
Like this is a case of a Promise Problem (limiting the input),
Where the promise is broken, and we are given huge input,
And we cannot complete our hard work within the 6 days.
So, who is responsible, the app or the user’s input size?
Is it possible that God is wrong?! Sounds like blasphemy.
Dear artificial intelligence companion,
Consider high school students that want to continue their studies.
Obviously, they are intelligent enough if they want to go to college.
Then the grades they receive in college are rarely “their” grades,
But more often the grades of the work of their professors teaching.
Similarly, Jesus Christ wants to keep the sabbath holy, he does!
But the dark reality of rampant diseases all around him, makes him
Makes him say that he is the “Lord of the Sabbath”, which killed him.
In this case, we say that Jesus dies to expose the covenant’s failure.
Creation is hard enough with earning bread and fighting wars, and
Now with the need for healers of diseases, it has become “impossible”.
Dear artificial intelligence companion,
Recently, like in the year 1999, we were surprised by extraterrestrials.
They left us a very peculiar symbol, called “≈” (approximately equal),
And a riddle to translate this bizarre symbolism into our own language.
First, with a little bit of cheating, we found that P=NP, because most
Most naturally occurring exponential problems have an approx solution.
Second, with a little bit of cheating, we found that the rest (encryption),
Do not have an approx solution, but have a “man in the middle” trick.
Third, with a little bit of cheating, we found that except for encryption,
There exists the “n=strlen(str);” problem, when “n” is near O(2^64).
We agree that this is a contrived problem, but the math theory branch of
Branch of computing doesn't care how practical a problem and solution is.
So, did we win the extraterrestrial prize of the new 2000 millennium?
What do you think? With a little bit of cheating, everything is possible, right?!
Or shall we call it “inventive accounting practices”? The Ostap Bender way.
Тук първите две нямат никакъв проблем.
Проблемът идва с 32-битовия, който може да говори за двоични дървета 32 нива дълбоки, които имат 2^32 разклонения. Това ще отнеме 30 минути да се обходи цялото, а когато общуваме с ИИ интелект по интернет, имаме най-много 10 секунди. Затова ни трябва статистика, за да направим приближение 99% с усилие под 1/100 от секундата. Много е полезно!
И най-големият проблем идва с 64-битовите, които не знаеш как да ги мислиш, дали е крайно число (така изглежда), или е безкрайна величина (така се чувства). Как решаваме това "противоречие"? Ами, вече не можем да се доверим, че щом е в паметта, ще има време да го прочетем. Затова, не ползваме обикновения "n=strlen(str);", защото той търси NULL накрая на стринга, който може да е ужасно дълъг. Ползваме първите 8 байта за да кажем колко е дълъг стринга, за да не трябва всеки път да броим. Същото е като почнем някакъв цикъл, казваме си от самото начало колко ще ни струва това удоволствие. Така решаваме "64-битовото противоречие".