[Question]
  [
## Background
Two numbers, \$a\$ and \$b\$, are said to be connected by a Brussels choice operation\* if \$b\$ can be reached from \$a\$ by doubling or halving (if even) a substring (the substring must not be empty and may not contain any leading 0s but it can be 0) in the base-10 representation of \$a\$
\*This operation is slightly different from the one defined on this [paper](https://arxiv.org/pdf/1902.01444.pdf) mainly that the operation defined in the paper allows empty substrings and does not allow choosing the substring "0"
For example, all the number that can be reached from `5016`:
```
508     (50[16] half   -> 50[8])
2508    ([5016] half   -> [2508])
2516    ([50]16 half   -> [25]16)
5013    (501[6] half   -> 501[3])
5016    (5[0]16 half   -> 5[0]16)
        (5[0]16 double -> 5[0]16)
5026    (50[1]6 double -> 50[2]6)
5032    (50[16] double -> 50[32])
10016   ([5]016 double -> [10]016)
        ([50]16 double -> [100]16)
10026   ([501]6 double -> [1002]6)
10032   ([5016] double -> [10032])
50112   (501[6] double -> 501[12])
```
## Task
Write a program/function that when given two positive integers as input outputs a truthy value if they can reach each other with a single Brussels choice operation and a falsey value otherwise.
## Scoring
This is [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'") so shortest bytes wins.
## Sample Testcases
```
2, 4       -> Truthy
4, 2       -> Truthy
101, 101   -> Truthy
516, 58    -> Truthy
58, 516    -> Truthy
516, 5112  -> Truthy
5112, 516  -> Truthy
1, 3       -> Falsey
123, 123   -> Falsey
151, 252   -> Falsey
112, 221   -> Falsey
101, 999   -> Falsey
999, 1001  -> Falsey
101, 1001  -> Falsey
```
---
*Inspired by [The Brussels Choice - Numberphile](https://www.youtube.com/watch?v=AeqK96UX3rA)*
  
[Answer]
# [Retina](https://github.com/m-ender/retina/wiki/The-Language), 38 bytes
```
L$w`0|[1-9]\d*
$`$.(*2*)$'
m`^(.+),\1$
```
[Try it online!](https://tio.run/##JYkxDsJAEAP7fcciLoeJ4k0WhRfQ8AMCOiQoKEKBkGj4@7ERxVj2@HV/P55X1lU6lHrUT@m@J2735@mWRYu2KVtudC1zuaR202Ci1kr0YhhkgAk7IhBaj0DohHl4Gswozh18FB8R7b/ikiUW8wM "Retina – Try It Online") Link includes test cases. Outputs `0` for Falsey, non-zero for Truthy. Explanation:
```
L$w`0|[1-9]\d*
```
Match all integer substrings of both inputs, including `0` but not integers beginning with `0`.
```
$`$.(*2*)$'
```
List the result of doubling that substring only.
```
m`^(.+),\1$
```
Check to see whether this produces any pairs of equal integers.
[Answer]
# [Python 2](https://docs.python.org/2/), ~~180~~ \$\cdots\$ ~~121~~ 111 bytes
Saved 2 bytes thanks to [Mukundan314](https://codegolf.stackexchange.com/users/91267/mukundan314)!!!  
Saved a whopping 16 bytes thanks to an idea from [Dominic van Essen](https://codegolf.stackexchange.com/users/95126/dominic-van-essen)!!!  
Saved 7 bytes thanks to [Kevin Cruijssen](https://codegolf.stackexchange.com/users/52210/kevin-cruijssen)!!!  
Saved 10 bytes thanks to [Neil](https://codegolf.stackexchange.com/users/17602/neil)!!!
```
def f(*p):a=`min(p)`;return max(a[:i]+`2*int(a[i:j])`+a[j:]==`max(p)`for j in range(len(a)+1)for i in range(j))
```
[Try it online!](https://tio.run/##bZHBasMwEETv/oq9SYq3EClxCC7uMeceejMGK1RuZRzFSAq0X@@uDCUQRbd9O6MRo/k3fl@dWpZPM8DAN7OoddNfrOOz6F@9iTfv4KJ/uG5r25W92lgXabD12Im@1O1Ydw0ZSEGG4ephBOvAa/dl@GQc16KUInF756MQSzQhBmiAF0CHc4mwEwgnPQUj8B8SlTlWCHuCH/52Z3sE9cjkNvm3MuNqR1w9yavIoCr15CGUqZTMFpU8IFTHx4TqSFQeMryq6bJ8kQIyhyh8qoidtJ0YAnvXITBRpDojmlToWmO9ijXCmdRxHVK1A9d4Fus4e/o28rCXN4YBfRuaxnTLHw "Python 2 – Try It Online")
Returns either `True` or `False`.
[Answer]
# [Brachylog](https://github.com/JCumin/Brachylog), ~~13~~ 12 bytes
```
p{~c↺×₂ʰ↻c}ᵈ
```
[Try it](https://tio.run/##SypKTM6ozMlPN/pfXa6koGunoFRuX/2obcOjpuZHHcuVSopKU/WUakDMtMScYiC79uGuztqHWyf8L6iuS37Utuvw9EdNTac2PGrbnQwU7vj/PzraUMc4VifaSMcESJroGAFJQwNDHSAGsYyMdYAYxDI11DEyBcsaGukYGYFkTQ3NdEwtQAwLHSAbJgJUAGYC1YFEYwE "Brachylog – Try It Online") [onl](https://tio.run/##SypKTM6ozMlPN/pfXa6koGunoFRuX/2obcOjpuZHHcuVSopKU/WUakDMtMScYiC79uGuztqHWyf8L6iuSwapatt1ePqjpqZTGx617U4GynT8/x8dbWpoaKRjamgWqxNtaGCoY2lpCWQBSR1DAwPD2FgA)[ine!](https://tio.run/##ATEAzv9icmFjaHlsb2cy//9we35j4oKD4oa6w5figoLKsOKGu2N94bWI//9bMTAxLDEwMDFd)
*-1 byte thanks to Zgarb*
Takes input as a list `[a, b]` through the input variable and outputs through success or failure.
```
p               Permute the input.
 {        }ᵈ    For the first element of the input:
  ~c            take some partition of it,
     ×₂         double
    ↺  ʰ↻       the second element of the partition,
         c      and re-concatenate it.
 {        }ᵈ    It's possible for the result to be the second element of the input.
```
[Answer]
# [R](https://www.r-project.org/), ~~120~~ ~~117~~ ~~112~~ 106 bytes
*Edit: -5 bytes thanks to Giuseppe (again)*
*Edit2: -6 bytes by using vectorized arguments to `substring` and `paste` and so avoiding any loops*
```
function(v,m=min(v),`[`=substring,b=rep(1:m,e=m))max(v)%in%paste0(m[0,b-1],as.double(m[1:m,b])*2,m[1:m+1])
```
[Try it online!](https://tio.run/##dY3PCsIwDIfvPsVABq1GWeIqQ@jVJ/AmQ1etUrB1tJv49rN68Q/1EBK@L8nPDybslO9D0Jcgh1PvDp25OnYDK62JncN@u5ehV6Hzxp1BSa9bhisLWlrObXOPO7lxeduEThfMbgtQM6yhCfPjtVcXHdFzXdV8QvCap1jzz1x2YAgLzrNxth59c4LyxTc/vARKciwQYqUdLSBWMgcFAglKOyQgwqQTuARRJeNEBdGm1fMqvv0jY977cngA "R – Try It Online")
**How?**
```
is_brussels=
function(v,             # v is vector of 2 input values
 m=min(v),              # m is smaller input value
 s=substring)           # s is alias to substring function.
 max(v) %in%            # Main function : Is larger input value present in ...
  sapply(1:m,           # the results of applying all combinations of 1..m ...
   function(b)          # to the 'brussels' function with beginning b ...
    paste0(s(m,0,b-1),  # which pastes together m (up to b)...
     as.numeric(s(m,b,1:m))*2,
                        # onto 2x m (from b to all values of e from 1:m) ... 
     s(m,2:m)           # onto m (from e onwards)?
    )
  )
```
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E/wiki/Commands), ~~31~~ ~~27~~ 23 [bytes](https://github.com/Adriandmen/05AB1E/wiki/Codepage)
```
{R`.œv3FyDNè·Nyg%ǝ])Jćå
```
-4 bytes as bug-fix - thanks to *@ovs* for noticing. (Decreasing the bytes as bug-fix doesn't happen often, haha. :D)
Input as a pair of integers.
[Try it online](https://tio.run/##ATAAz/9vc2FiaWX//3tSYC7Fk3YzRnlETsOowrdOeWclx51dKUrEh8Ol//9bMTIzLDEzNF0) or [verify all test cases](https://tio.run/##yy9OTMpM/V9Waa@k8KhtkoKSfaXS/@qgBL2jk8uM3Spd/A6vOLTdrzJd9fjcWE2vI@2Hl/5X0gvT@R8dbahjHKsTbaRjAiRNdIyApKGBoQ4Qg1hGxjpADGKZGuoYmYJlDY10jIxAsqaGZjqmFiCGhQ6QDRMBKgAzgeogooZA44xhphmbxMYCAA).
**Explanation:**
```
{R                 # Sort the (implicit) input-pair from highest to lowest
  `                # Pop and push both values separated to the stack
   .œ              # Get all partitions of the top lowest integer
     v             # Loop over each partition `y`:
      3F           #  Inner loop `N` in the range [0, 3):
        yD         #   Push partition `y` twice
          Nè       #   Get the `N`'th item of the partition (modulair 0-based)
            ·      #   Double it
             N     #   Push index `N` again
              yg%  #   Modulo the length of the current partition `y`
                   #   (since builtin `ǝ` doesn't index modulair)
                 ǝ #   Insert the doubled substring back into the partition at that index
     ]             # Close both loops
      )            # Wrap all values on the stack into a list
       J           # Join each partition back to a single string
        ć          # Extract the head; pop and push the remainder-list and first item
                   # separated to the stack (which is the highest value that was still on
                   # the stack)
         å         # Check if the list contains this highest integer
                   # (after which the result is output implicitly)
```
[Answer]
# [Raku](https://github.com/nxadm/rakudo-pkg), 48 bytes
```
{;*eq[|] m:ex/.+/>>.&{.replace-with($_/(2|.5))}}
```
~~[Try it online!](https://tio.run/##Xc3PCoJAEAbwe08xhxDNP9uOrkiRx56gW0ZIrShomRol6rNvqwdx28Mw/Pj2m5JXuS@KFrQEDiC6/Ya/zv0Fih3/EsckYehonVPxMo9v3P5kTaqvr0TH3mGGMQyijltIdLMgUR3dTWJM67hA8qwgzx68FtQCF6Znh3CM85q3K7TAm@1UvZu0XXkW4L/Rrfwth2LoSkN32UeZzCFDxai8gkiXxqhvAQuUGyyQRH3VppxsUGwsHJOz/QA "Perl 6 – Try It Online")~~ Oops, TIO doesn't have an up to date version of Raku, which means it doesn't have `replace-with`. I guess we'll have to go with [repl.it online!](https://repl.it/repls/DaringEmbellishedSpyware) instead.
[Answer]
# JavaScript (ES9), 102 bytes
Returns either `false` or `1`.
```
f=(a,b,i)=>(g=r=>a.replace(o=RegExp('(?<='+r),n=>o=n*2)==b&++o||o&&g('.'+r)|g(r+'.'))`)`||!i&&f(b,a,1)
```
[Try it online!](https://tio.run/##dY7BToQwEIbvPoVeOq1UQruL8eDgSR/AeFtNtmBBDKGkrEaTvju25aKx9NCZ/N/8M/@7@lRzY/vpdDWaV70sLVLFa94zrGiHFiuVWz0NqtHU4KPu7r8mCvTuFiGzjI9YGRwvJUOsSZYZ5wwhHYU8UNdRm/mWsSM7OnfRE9LSmisu2NKYcTaDzgfjpw8Papi/X4Cd/ZZbeu4fCOCh7PyafxiE3HkcSxKXwQ2ylGksZMRSBPyHw/N4eLIfp7etWHKNtU8tjjpfp5J3ixgrlBQuxXVwQ3mTXB50vk5tuv0vUrdXfcvtExUyuouIlx8 "JavaScript (Node.js) – Try It Online")
### How?
We recursively build all possible regular expressions matching the first occurrence of \$p\$ digits preceded by \$q\$ digits, using a lookbehind assertion. The matched string is coerced to an integer, doubled and coerced back to a string.
Example:
```
"123456".replace(/(?<=..).../, n => n * 2) // -> "12[345]6" -> "12[690]6"
```
We stop the recursion when no replacement occured (failure) or the result is equal to the other number (success). We try to turn either `a` into `b` or `b` into `a`.
### Commented
```
f = (                     // f is a recursive function taking:
  a, b,                   //   the input numbers a and b
  i                       //   a flag i telling if the numbers were already swapped
) => (                    //
  g = r =>                // g is a recursive function taking a pattern r
    a.replace(            // replace in a:
      o =                 //   initialize o to a non-numeric value
      RegExp('(?<=' + r), //   turn r into a regular expression of the form /(?<=..)../
      n =>                //   if something is matched: replace the substring n with
        o = n * 2         //   2 * n and assign the result to o
    ) == b                // end of replace(); success if the result is equal to b
    & ++o                 // and o is an even number, which becomes odd when incremented
    || o &&               // otherwise, if o is not equal to NaN:
      g('.' + r) |        //   try again with 1) another leading '.' in r
      g(r + '.')          //   and 2) with another trailing '.' in r
)`)`                      // initial call to g with r = ')'
|| !i && f(b, a, 1)       // if i is not set, try again with a and b exchanged
```
[Answer]
# [Python 3.8 (pre-release)](https://docs.python.org/3.8/), 115 bytes
```
lambda*x:(a:=str(min(x)))and{str(max(x))}&{a[:i]+str(2*int(a[i:j]))+a[j:]for j in range(len(a)+1)for i in range(j)}
```
[Try it online!](https://tio.run/##bZFBboMwEEX3OcWsigdcKTaQIkt02RN0R1g4DaQgYpDtSFSIs1ObVo0U6oXleeM/3/oevuxnr@Js0EudH5dOXk9nGY6CSJEbq8m1UWRERKnO01rL0dfz0yQL0ZSRZzxslCWyaERbIkayaEVZ9xpaaBRoqS4V6SpFJEYMPW/uvMV5sZWxBnIgO3CLEEYhRgpvsjMV0l/IKSQOvuvbnSUU@CNjeyd324bz2HG@HcxSJ@Ap3zaY8@ScbRopO1BIs0eHNHOUHTZ4ve2GbRve4B@F83RPZfs/45XjTvuMguONvyQfAYX1xOIAdz5TSyuf6pqlWAU@0pqE9kc@aP9HdTDZGZ5fYTIzTLo49X1HDOZ5Vc4BLt8 "Python 3.8 (pre-release) – Try It Online")
---
# [Python 3](https://docs.python.org/3/), ~~139~~ 116 bytes
~~A golf of [Noodle9's answer](https://codegolf.stackexchange.com/a/210140/64121).~~ Outputs a set containing `b` if there is a Brussels choice, an empty set otherwise.
```
def f(*x):a,b=map(str,sorted(x));return{b}&{a[:i]+str(2*int(a[i:j]))+a[j:]for j in range(len(a)+1)for i in range(j)}
```
[Try it online!](https://tio.run/##bZHBToQwFEX38xVvJX1DTaYFxgkGl36BO2RRnKIQBNKWZAzh2/EVjZMMdtE05/a@29wOX@6j76JlOesKKra/YKp4mX2qgVlnuO2N02d2QXw02o2mm8r5blJ5Whch6Uzu684xlddpUyCGKm/SouoNNFB3YFT3rlmrO6YwFOh5feUNzovT1lnIgO2AFmOCQ4QcnlVrNfJfKDnEBF/MeGUxB3nLxIHstG24jIjL7WCRkEEmcisIypRSbIREHDkkp9uE5ERUHDd4vU3DtoIP@MdBmfRUcfgLXjnujO8oeB3lQ/wWcFhPIgpw5zt1XPtW1y7T1eArpb90P/bB@D@qgsnNcP8Ek51hMnnZ9y2zmGW6mANcvgE "Python 3 – Try It Online")
[Answer]
# perl -Mfeature=say -na, 68 bytes
```
($_,$n)=@F;m[.+(?{say$=if$n eq$`.($&/2).$'||$n eq$`.($&*2).$'})(?!)]
```
[Try it online!](https://tio.run/##TY6xDoJADIb3PkVNLsqpIC2cgRiik5tPYIwyHAmJHgg4GPHVPU90cPia9mv6p7VuzspaTxznwshss11d9sHMWz/a/C6yshAG9VWcAk@MFywDMen7PzUd1FN665E8WMsYQ4wMFBI6QNESVQIqQdd9JyKGTxkMYQTEETqAFCErd@t2zDRkpGkKDpcV0i80pFdVd2VlWuvvCp13t0Zn7lfrm/wN "Perl 5 – Try It Online")
Reads two numbers from the input, and prints 60 if there's a way to connect the numbers, and nothing otherwise.
## How does it work?
We take every possible, non-empty, substring of the first number; this will be in available in `$&`. The part of the first number which proceeds the current substring is in `$`` , the part after it is in `$'`. We then create two new strings, by either multiplying the substring by 2, or dividing it by 2, and sandwiching it between `$``  and `$'`. We then compare this with the second number, and print `$=` if there is a match (`$=` by default contains 60). Note that if the substring is odd, the resulting string will contain a decimal point, and hence, will not match with the second number.
[Answer]
# [Perl 5](https://www.perl.org/) `-pl`, 122 bytes
```
$t=<>;for$a(1..y///c){for$b(0..y///c){$z||=/(.{$b})(.{$a})/&&$2!~/^0./&&grep$t==$_,$2%2==0&&$1.$2/2 .$',$1.$2*2 .$'}}$_=$z
```
[Try it online!](https://tio.run/##PYxBCsIwEEX3nkJhrIm0M5NAVxpv4BUsrVQRigmxG9vGoxvTLlx8/nt8@K71XRkj9OZ4Otysh1ooxDcRXeU4eyP47zBMkyGBIzRBzlUHSVkGevOhC2PCu29d@jJQ5aC32hhOs0LQpNcIu3zh/cIhQGVgiFGxWqV8resf9vmKxblEVhwL1/0A "Perl 5 – Try It Online")
]