# Non-recursive/iterative self-similar function?

**URL:** <https://boards.straightdope.com/t/non-recursive-iterative-self-similar-function/846022>\
**Category:** Factual Questions\
**Created:** [January 6, 2020, 8:49am UTC](https://boards.straightdope.com/t/non-recursive-iterative-self-similar-function/846022 "2020-01-06T08:49:01Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sage\_Rat](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/sage_rat/32/399_2.png) [@Sage\_Rat](https://boards.straightdope.com/u/Sage_Rat)\
**Post date:** [January 6, 2020, 8:49am UTC](https://boards.straightdope.com/t/non-recursive-iterative-self-similar-function/846022/1 "2020-01-06T08:49:01Z")

</div>

Is there any mathematical function in the world with the following properties?

1. It has forms in at least the third and higher dimensions, all of which achieve this full set of properties.
2. It includes a varying sample of curves, including discontinuous jumps between infinity and non-infinity. (Turbulent)
3. For any region being looked at, you will be able to find another region which is very similar _but not exactly the same_.
4. It is computable where you can find similar regions.
5. Ideally, the regions can be traversed in a way where they go from smooth to turbulent, with finer detail if you move in space along a particular route and more lumpy and/or discontinuous if you move along a different route.
6. Generating a plot of a region either does not require recursion nor iteration, or the number of steps is small enough that it’s feasible to go from a smooth plain to a field that is, effectively, random around the 16 iteration mark (for the same level of zoom, if we are comparing two regions, and talking about the result of graphing per a particular pixel resolution).

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [January 6, 2020, 1:38pm UTC](https://boards.straightdope.com/t/non-recursive-iterative-self-similar-function/846022/2 "2020-01-06T13:38:22Z")

</div>

It’s going to be difficult to pin down what you mean by “without iteration”.

One option that comes to mind is something like the Cantor set, which is simplest to define in 1 dimension, but which can be generalized easily enough: A point in the interval [0,1] is in the Cantor set iff its base 3 representation does not contain any 1s. But given a point, how do you test that, and does that count as recursion? Actually, step back a moment: How are you even given a point to begin with?

---

<div class="post-metadata">

**Author:** ![Lance\_Turbo](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/lance_turbo/32/6156_2.png) [@Lance\_Turbo](https://boards.straightdope.com/u/Lance_Turbo)\
**Post date:** [January 6, 2020, 1:47pm UTC](https://boards.straightdope.com/t/non-recursive-iterative-self-similar-function/846022/3 "2020-01-06T13:47:35Z")

</div>

> [@Chronos](#):
>
> One option that comes to mind is something like the Cantor set, which is simplest to define in 1 dimension, but which can be generalized easily enough: A point in the interval [0,1] is in the Cantor set iff its base 3 representation does not contain any 1s.

Not exactly. A point in the interval [0,1] is in the Cantor set iff its base 3 representation **can be written without** any 1s.

1 is in the Cantor set and its base 3 representation is 1 which contains a 1. However, 1 **can be written** as 0.222… in base 3 which does not contain any 1s.

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [January 6, 2020, 2:08pm UTC](https://boards.straightdope.com/t/non-recursive-iterative-self-similar-function/846022/4 "2020-01-06T14:08:23Z")

</div>

Good catch, yes.

---

<div class="post-metadata">

**Author:** ![Senegoid](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/senegoid/32/6606_2.png) [@Senegoid](https://boards.straightdope.com/u/Senegoid)\
**Post date:** [January 6, 2020, 9:50pm UTC](https://boards.straightdope.com/t/non-recursive-iterative-self-similar-function/846022/5 "2020-01-06T21:50:25Z")

</div>

> [@Lance\_Turbo](#):
>
> 3 representation is 1 which contains a 1. However, 1 **can be written** as 0.222… in base 3 which does not contain any 1s.

But does 0.222… (base 3) really equal 1 (base 3)?

\<ducks & runs very far, very fast…\>

---

<div class="post-metadata">

**Author:** ![Senegoid](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/senegoid/32/6606_2.png) [@Senegoid](https://boards.straightdope.com/u/Senegoid)\
**Post date:** [January 7, 2020, 11:45pm UTC](https://boards.straightdope.com/t/non-recursive-iterative-self-similar-function/846022/6 "2020-01-07T23:45:04Z")

</div>

Sometimes, if I get just the right amount drunk at a local bar, and then attempt to walk home, I suspect my path approximates the function that OP is looking for.
