I came across a comment recently "reads like sentences strung together with no logic." But is this even possible?

Sentences can be strung together randomly if the selection process is random. (Random sentences in a random sequence.) Stochasticity does not seem logical—it's a probability distribution, not based on sequence or causality.


That stochastic process is part of an algorithm, which is a set of instructions that must be valid for the program to compute.

So which is it?

  • Is randomness anti-logical?

Some definitions of computational logic:

The arrangement of circuit elements (as in a computer) needed for computation also: the circuits themselves Merriam Websters A system or set of principles underlying the arrangements of elements in a computer or electronic device so as to perform a specified task. Logical operations collectively. Google Dictionary The system or principles underlying the representation of logical operations. Logical operations collectively, as performed by electronic or other devices.
Oxford English Dictionary

Some definitions of randomness

Being or relating to a set or to an element of a set each of whose elements has equal probability of occurrence. Lacking a definite plan, purpose, or pattern. Merriam Websters. Made, done, happening, or chosen without method or conscious decision. Google Dictionary Having no definite aim or purpose; not sent or guided in a particular direction; made, done, occurring, etc., without method. Seeming to be without purpose or direct relationship to a stimulus. Oxford English Dictionary

  • 1
    $\begingroup$ A simple counterexample to your statement would be an error-proof logical circuit built out of noisy components. $\endgroup$ – naive Aug 16 '19 at 6:39
  • 1
    $\begingroup$ I don't know if this is off-topic, but when I think of randomness, I'm inclined to think in cosmological terms. If we can find a formalised version of this, < medium.com/intuitionmachine/… >, I can write an answer. My link is a bit to close to a blog post for my taste. Best wishes to you OP. $\endgroup$ – Tautological Revelations Aug 25 '19 at 11:52
  • $\begingroup$ @TautologicalRevelations I just finished the article--thanks for that. An answer summarizing the points made in the article would be a good answer. Certainly it's a fresh perspective that may get to the root of the question! $\endgroup$ – DukeZhou Aug 28 '19 at 19:17
  • $\begingroup$ That sounds reasonable. Unfortunately, quantum chaos is a technical topic. All the best! $\endgroup$ – Tautological Revelations Aug 29 '19 at 3:02
  • 1
    $\begingroup$ Fuzzy logic is a potential bridge between formal logic and randomness. Consider: Does fuzzy logic reduce uncertainties and multi-variate logics (yes, I used a plural form of an uncountable) to binary logic via the interface of Boolean Algebra? If there is an interest in this, I shall consider writing another answer in this style. $\endgroup$ – Tautological Revelations Sep 6 '19 at 18:35

I think the answer here lies in that the dictionary definition of randomness you have is not the one used in statistics, ML, or mathematics. We define randomness to mean there exists a distribution with generally greater than 0 uncertainty.

Depending on who you talk to, we live in a random universe (the way we define quantum mechanics depends on a wave function (essentially a probability distribution)

So why if a sequence is drawn from a distribution is it illogical? First, even as humans we can make a strong argument that what we say is random. I mean we speak to convey some form of message or context, but there exists multiple ways to deliver this, but we choose a single one. Our brains inherently model $p(\vec w|c)$ where $\vec w$ is the sequence and $c$ is our context or message we want to convey.

Takeaway: Generating a sequence in an ergodic or uniform manner would be illogical, but that is not what is being modeled or done in practice. Normally its drawn from some complex distribution.

Sidenote: My above claim could make it seem that being uniformly random implicates something illogical, and I want to emphasize that is not the case. It is domain to domain, sometimes that is the most logical solution, just in the case of sentence generation it normally isnt. I would define a logical algorithm as one that given the information at hand acts in a sensible manner towards achieving some goal, and so if something purely random does that, I don't see the problem.

  • $\begingroup$ Good answer. I intentionally restricted my definitions largely to computational logic. There has been some inquiry into the role of quantum phenomenon (probability distributions in general) and "mind", so I'm pondering the link and role of stochasticity. For instance, can there truly be choice in a purely deterministic system? (Yes and no?) $\endgroup$ – DukeZhou Aug 2 '19 at 17:19
  • $\begingroup$ For instance, two deterministic algorithms can be playing a non-trivial abstract game. Where the decision making process is of the competitor is unknown, indeterminacy arises. Yet the decision making process is fully deterministic, so the algorithms don't have "choice" in the sense that the decisions will be the same for a given game state. $\endgroup$ – DukeZhou Aug 2 '19 at 17:26

I might misunderstand your question, but there seem to be different levels of logic at play here.

  1. Computing logic, whereby any computational process is based on processor logic. In this case, any computing is involving logic, as boolean logic drives any processing.

  2. Linguistic logic, where there is a logic in the sequencing of sentences within a text. A random collection of sentences is not a text, as there need to be certain principles behind the structure to make it a narrative.

While you can easily generate a sequence of random sentences, they will not mean anything; there won't be any logic behind selecting a particular sentence to follow on from another one. So this is linguistic logic rather than processing logic. Note that where the linguistic logic is makes it a bit vague: I can read a randomly selected sequence of sentences and ascribe meaning to it by building a mental model that treats it as a logically constructed text. This principle is what made ELIZA so successful: even though the program's answers were based on simple pattern matching rules with no understanding, many users assumed there was logic/meaning behind it and interpreted it as such, papering over the cracks in the conversation.

In summary: there is logic involved in random sentence combining, but it is the low-level computing logic, not the higher-level linguistic interpretative logic, which is generally absent from randomly generated data.


In certain games, random selection is the optimal strategy. See: Matching Pennies

Strategy is essentially a plan of action utilized to achieve a goal.

  • If random choice can be a strategy, it seems that it must be a form of logic, even if the nature of the stochastic process is counter to all forms of formal logic.

This seems paradoxical, in that the random strategy is to have no strategy (random choices.)

  • 1
    $\begingroup$ As I mentioned in my answer being purely random is not illogical in certain cases— where are you seeing the paradox to formal logic? $\endgroup$ – mshlis Aug 2 '19 at 17:11
  • $\begingroup$ @mshlis it seems like stochasticity has no role in formal logic, but is utilized in computational logic. I've been doing some linguistic and semantic research, trying to get at the roots of these concepts. $\endgroup$ – DukeZhou Aug 2 '19 at 17:20
  • $\begingroup$ why do you say no role? Where is that coming from? $\endgroup$ – mshlis Aug 2 '19 at 17:21
  • $\begingroup$ @mshlis Formal logic seems to involve truth statements and inference. Randomness seems to throw a wrench into these gears. $\endgroup$ – DukeZhou Aug 2 '19 at 17:23
  • 1
    $\begingroup$ distribution in leads to distribution out. Only when you observe do you get a definitive output (similar to collapse in quantum mech) $\endgroup$ – mshlis Aug 2 '19 at 17:30

Previous answers are very well written. I just wanted to supplement the thread by giving a simple example. The example shows how a logical function can be computed without errors using noisy components.

Taken verbatim from Neural Networks by Raul Rojas. An excellent book: enter image description here

an example of a network built using four units. Assume that the first three units connected directly to the three bits of input $x_1, x_2, x_3$ all fire with probability $1$ when the total excitation is greater than or equal to the threshold $\theta$ but also with probability $p$ when it is $\theta − 1$. The duplicated connections add redundancy to the transmitted bit, but in such a way that all three units fire with probability one when the three bits are $1$. Each unit also fires with probability $p$ if two out of three inputs are $1$. However each unit reacts to a different combination. The last unit, finally, is also noisy and fires any time the three units in the first level fire and also with probability $p$ when two of them fire. Since, in the first level, at most one unit fires when just two inputs are set to $1$, the third unit will only fire when all three inputs are $1$. This makes the logical circuit, the AND function of three inputs, built out of unreliable components error-proof.


Let me add an example from machine learning that shows that resorting to randomness is the optimal way, sometimes.

When working on the whole data is not tractable (computation cost, data does not fit in memory), working on random samples can be an optimal way to train a machine learning algorithm. One of the most used optimization technique in those cases is the Stochastic Gradient Descent.

It is an iterative procedure that computes the estimates of the true gradient of the loss function that needs to be minimized, over a randomly selected data point from the whole data. After getting the gradient estimate, the weights are updated, all this done by the well known back-propagation algorithm. This procedure is repeated many times until a stopping criterion.

The rule is:

$ \theta_{k+1} \leftarrow{} \theta_{k} - \eta_k \nabla (f_{i(k)}(x_k))$

where $\theta$ are the weights of the network, $f$ is the loss function whose gradient is computed w.r.t the weights of the network, $x_k$ is the randomly chosen sample to compute gradients for, and $\eta_k$ is the step size to multiply the negative of the gradient with.

  • $\begingroup$ How is this related to the question "Is randomness anti-logical?"? SGD can indeed be related to this question, but you're not explaining or emphasizing how or why. $\endgroup$ – nbro Nov 28 '19 at 17:22
  • $\begingroup$ @nbro This answers points to the fact that working on random samples can be an optimal way to train a neural network, when working on the whole data is not tractable. Basically the answers is on the lines of - randomness is not anti-logical, with a counter-example to the statement in the question. $\endgroup$ – naive Nov 28 '19 at 17:31
  • $\begingroup$ Just edit your answer to include these details. If someone is not familiar with GD, they will not understand your answer. You should say that randomness is not necessarily anti-logical and that random actions can actually lead to the most optimal (thus logical?) solution. This is actually a good answer, if you add the details I've just mentioned. Along the same lines, you can also talk about $\epsilon$-greedy policy in Q-learning, if you are familiar with it. $\endgroup$ – nbro Nov 28 '19 at 17:33
  • $\begingroup$ @nbro Edited the answer. Hope it is more understandable now. Thanks $\endgroup$ – naive Nov 28 '19 at 17:51

Central Premises:--

This, computability of randomness in conjunction to logic, is unfortunately/fortunately a very technical topic.

" ... That stochastic process is part of an algorithm, which is a set of instructions that must be valid for the program to compute.

... Is randomness anti-logical?" ~ DukeZhou (Stack Exchange user, opening poster)

This answer is about: randomness and chaos; and how they relate to logic and computability.

"What is randomness and where does it come from? This is one scary place to venture in. We take for granted the randomness in our reality. We compensate for that randomness with probability theory. However, is randomness even real or is it just a figment of our lack of intelligence? That is, does what we describe as randomness just a substitute for our uncertainty about reality? Is randomness just a manifestation of something else?" — "Medium." Medium, < medium.com/intuitionmachine/there-is-no-randomness-only-chaos-and-complexity-c92f6 >.


"Many natural intensional properties in artificial and natural languages are hard to compute. We show that randomized algorithms are often necessary to have good estimators of natural properties and to verify some specific relations. We concentrate on the reliability of queries to show the advantage of randomized algorithms in uncertain cognitive worlds." — de Rougemont, Michel. "Logic, randomness and cognition." Logic, Thought and Action. Springer, Dordrecht, 2005. 497-506.

Layperson's Explanations:--

Unfortunately, quantum chaos in relation to randomness, is a profoundly technical topic. I have managed to track down sources that relatively aren't overly technical.

As a starting point, this Wikipedia article is worth reading:--


You can continue and read this particular Medium post:--


For profoundly technical topics, I recommend this book series, as they are written by experts in basic technical terms, for the laypersons wanting to study technical topics:--


I recommend reading:--

  • Chaos: A Very Short Introduction
  • Probability: A Very Short Introduction
  • Fractals: A Very Short Introduction

Other References for the Layperson:--

Some broader implications of chaos [Link to Stanford Encyclopedia of Philosophy].

When I think of randomness, I'm inclined to think in cosmological terms. Is randomness is a structural property of the universe? Is anything in the universe truly random?

Technical Explanations:--

"In mathematical logic, independence is the unprovability of a sentence from other sentences." Wikipedia contributors. — "Independence (mathematical logic)." Wikipedia, The Free Encyclopedia. Wikipedia, The Free Encyclopedia, 3 Feb. 2019. Web. 29 Aug. 2019.


"We propose a link between logical independence and quantum physics. We demonstrate that quantum systems in the eigenstates of Pauli group operators are capable of encoding mathematical axioms and show that Pauli group quantum measurements are capable of revealing whether or not a given proposition is logically dependent on the axiomatic system. Whenever a mathematical proposition is logically independent of the axioms encoded in the measured state, the measurement associated with the proposition gives random outcomes. This allows for an experimental test of logical independence. Conversely, it also allows for an explanation of the probabilities of random outcomes observed in Pauli group measurements from logical independence without invoking quantum theory. The axiomatic systems we study can be completed and are therefore not subject to Gödel's incompleteness theorem." Paterek, Tomasz, et al. "Logical independence and quantum randomness." — New Journal of Physics 12.1 (2010): 013019.


Other Technical Explanations, Sources, References, and Further Reading:--


  • I usually do not use Medium or Quora as a source, with some exceptions. I have chosen to do so here.
  • I've decided to place Stanford Encyclopedia of Philosophy sources in the layperson's section.
  • 1
    $\begingroup$ This answer really doesn't touch upon the question. It is a bunch of links. I would say please elaborate on the central idea that you want to convey, which would make this a valid answer. $\endgroup$ – naive Aug 29 '19 at 11:43
  • $\begingroup$ Okay. If you have any other suggestions as to how formalised information should be communicated, then please say so. Let's work out the issue like rational adults. :) :D $\endgroup$ – Tautological Revelations Aug 29 '19 at 12:45
  • $\begingroup$ There is no issue that needs to be worked out. Pay a visit here. $\endgroup$ – naive Aug 29 '19 at 13:26
  • $\begingroup$ A certain improvement. If you could elaborate more on -- Randomness is a structural property of the universe. -- the answer would surely become better. $\endgroup$ – naive Aug 29 '19 at 14:29
  • $\begingroup$ "There is no issue that needs to be worked out." ~ naive, user. Then I don't need to do anything? $\endgroup$ – Tautological Revelations Aug 29 '19 at 14:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.