r/computerscience • u/stgabe • Apr 10 '25
If you had a non-deterministic computer, what would you do with it?
Brainstorming a writing idea and I thought I'd come here. Let's suppose, via supernatural/undefined means, someone is able to create a non-deterministic device that can be used for computation. Let's say it can take a function that accepts a number (of arbitrary size/precision) and return the first positive value for which that function returns true (or return -1 if no such value exists). Suppose it runs in time equal to the the runtime of the worst case input (or maybe the run time of the first accepted output). Feel free to provide a better definition if you think of one or don't think mine works.
What (preferably non-obvious) problems would you try to solve with this?
106
u/SV-97 Apr 10 '25
When you build the most powerful computer yet but somehow still can't figure out how to build a fucking type system
45
u/spacewolfXfr Apr 10 '25
Given your title, the closest precise definition I can think of is "What would you do if you could solve all NP problems in polynomial time?" (since the NP in the famous 'P vs NP' means "Nondeterministic Polynomial").
In which case, with such a machine, you could :
Those are my main thoughts, and as you can see, it would have a very broad impact.
A tamer version of that is a quantum computer, which is arguably nondeterministic, but with a caveat: you don't get the exact answer every time, but with good probability. It is not as strong as solving NP, but still has strong implications (breaks most of commonly used cryptography, solves some known problems even faster).
3
u/[deleted] Apr 10 '25
Damn. These responses. XD
21
u/Yoghurt42 Apr 10 '25
Obviously the first thing would be getting Doom to run on that thing.
4
u/Potential_Corner_268 Apr 10 '25
Figuring out the answer to the unvierse for sure
3
u/Cybasura Apr 10 '25
Determine
1
u/almostthebest Apr 10 '25
Sounds like quantum computing
2
u/Firzen_ Apr 10 '25
The runtime in the case that there is no solution isn't well defined, I think.
If I understand you correctly, your hypothetical machine is equivalent to having a machine with an unlimited number of cores that runs the function simultaneously for all possible inputs.
That would let you solve any problem in NP in polynomial time.
You still can't compute busy beaver or solve the halting problem. At least if the runtime can be infinite if there's an input for which the function does not terminate.
In practical terms, the most interesting problems it would let you solve is finding the pre-image of any hash function output. It would also break all asymmetric crypto. Funnily enough, it doesn't really break symmetric cryptography algorithms (as much, practically it likely still does) because you can't trivially decide which of the possible decrypted outputs is the correct one. In practice, symmetric is likely still broken just by doing frequency analysis or other sanity checks on each potential decrypted text and then only outputting 1 for decryption that pass some threshold of sensibility until there's only a practical number of possible results to check manually.
2
u/ryanstephendavis Apr 11 '25
If I had a non-deterministic computer, I'd use it to generate truly random numbers
2
u/LoopVariant Apr 12 '25
I would run stochastic computations.
3
u/DaveAstator2020 Apr 10 '25 edited Apr 10 '25
Run two threads on it and making them compete with one another on creating a problem that cannot be solved on a non deterministic computer.
1
u/threedubya Apr 10 '25
Your computer will run what is called super math . A ancient form of math used but a very not well known culture that disappeared. The Math system is unlike existing math but can run certain types of mathematical problems faster so as to massively break all types of encryption.
1
u/mycall Apr 10 '25
You could encode logic tables and use those to get deterministic results out of non-deterministic hardware. This is how it was done in the beginning of computers (although it was wires).
1
u/ilep Apr 10 '25
Random number generator.
1
u/Ecstatic_Witness_345 Apr 10 '25
You could prove/disprove essentially any mathematical theorem that reduces to existence/nonexistence of some object(s), which feels to me like a large proportion of math in general, including some very famous problems.
I am a little confused on runtime. When you say “equal to the runtime of the worst-case input” that doesn’t mean anything if that worst case input isn’t specified. If that case is intractable, this is no better than current computers.
1
u/riksterinto Apr 10 '25
Figure out which inputs don't always produce the same output and why.
1
u/SsNeirea Apr 10 '25
Make a translation layer
1
u/yoyoman2 Apr 10 '25
run doom
1
u/OliveTreeFounder Apr 10 '25
There is no need for non-deterministic computer as we already have a crowd of non deterministic coders.
1
u/vegetablebread Apr 10 '25
The computers we have now are non-deterministic. The breakdown of the boundary layer between two dissimilar semiconductors is a quantum process, and that's what causes bits to flip. If you wait a long time, it will happen, but you don't know when, like nuclear decay or Schrodinger's cat. We currently wait the shortest amount of time we can, because we want it fast.
We wait too short of an amount of time very frequently, and the bits don't flip to the state we expect them in. So we have all kinds of error correction algorithms fixing the mistakes we know we're making.
When you download a file, your computer checks if it got corrupted. When your CPU fetches a cache line from memory, it does the same thing. We send around the wrong data all the time because we're not patient.
So I guess the answer is: all the stuff we use computers for today.
1
u/Zicopo Apr 10 '25
Gamble
1
u/[deleted] Apr 11 '25
Just write about a cloud of magic smoke that someone let out if the machine and its after vengeance or somethin
Put some moonlight scenes and glitter in and ship it to Netflix.
Bonus points if you automate it all and just start spamming them
1
u/Classic-Try2484 Apr 11 '25
From the given run time it’s worse than deterministic.
But let’s say you had a machine that could always return an answer in exactly one year to any problem for which a provably correct algorithm can be written.
1
u/Impossible_Ad_3146 Apr 12 '25
I would try and determine what it’s for
1
u/GoldenMuscleGod Apr 12 '25
What you describe can’t be done by a non-deterministic Turing machine, you need an oracle machine for that.
1
u/Equal_Veterinarian22 Apr 13 '25
This would be great for training machine learning models. Generally, when training a model we want to find a minimum of the loss function. Checking whether a given point is a minimum (up to tolerance) is a lot cheaper than finding one.
1
u/AegorBlake Apr 14 '25
What's a non-deterministic computer
1
u/JewishKilt MSc CS student Apr 15 '25
Solve all math problems? Allow it to go over all Coq expressions until it finds one that solves whatever problem you're working on. Math could advance lightning-fast.
1
u/Immediate-Country650 Apr 15 '25
world hunger
1
u/Reasonable_Freedom16 Apr 19 '25
Non-deterministic as in 'able to solve NP in polynomial time'? Or as in 'quantum computers'?
I will create a website where you can solve NP-complete problems for a fee.
1
u/Naynoona111 Apr 10 '25
seems like a computer that is always in a race condition.
To achieve such computer, just make the entire ram readable/writeable by any program lmao.
Your BIOS will be pretty much toast after some cycles. (theoretically)
All running programs will have a probability associated with all different outputs, your hardware infrastructure is also vulnerable due to MMIO.
I think that the computer will run normally for 10 minutes, then the screen will turn black, keyboard will stop working, cpu will lose synchronization and finally the PC will just turn off and you cannot start it again, bricked.
0
u/luci9969 Apr 10 '25
We could create a conscious (theoretically from what we understand of consciousness till now) system by integrating self generated artificial intelligence. We could use a non deterministic AI model generator, which will perform model fitting on millions of data models, generated by small minor iterative changes on the factors and datasets. Using a ND model, we can choose that single perfect fit in a single iteration, then that model can be passed through to the ai algorithm based on which it will learn and actually perform the tasks.
If I'm not wrong here, this should mean that the ai is basically just taking input from its surroundings, going through its memory for familiar circumstances, and if it finds a new circumstance, it will generate a model and choose the perfect one to base off its actions. Considering the fact that WE TRAIN ai on models is one of the major things people say as to why ai is not conscious, our theoretical system has that capability on its own. Further it can also have millions of sets of constraints and be able to choose the correct one required for the system. Since this model is actually not just adapting to new things on its own, but also evolving to changes in things it already knows, I think that's basically a sign of conscious learning. I mean I frankly don't see a reason why such a being would not be considered conscious .
0
u/SV-97 Apr 10 '25
Such a computer could solve the halting problem: for any program P consider the function
(where steps are measured in whatever is appropriate for the model of computation. Turing machine steps, lambda reductions, graph rewrites or whatever). Then clearly your computer tells you in particular if P terminates.
I think you have to flesh this out a bit to account for the "no such number exists" case in some way. In the above example for example that case might take infinite time if the computer "tests all the numbers one after the other", but in that case it would be no different from the computers we have today (ignoring resource limitations. At some point you'd of course run out of memory, or in the hard limit you'd bump against information theoretical limitations of our universe)
0
u/scoby_cat Apr 10 '25
You are just describing all Las Vegas algorithms - they run in constant time and give no guarantees to result quality. They are used extensively in finance.
0
u/Biggergig Apr 10 '25
I probably run a benchmark to see what kind of FPS it gets on League of Legends. And then set up an API for it to try to make its potential widely acceptable. I know that there are practical uses, but nothing like that for me and so once it's available for researchers and other people (at cost of course 😇) I would start finding out the answers to interesting unsolved theorems like twin prime conjecture, or the collatz conjecture.
1
u/[deleted] Apr 19 '25
[removed] — view removed comment