[Question]
  [
This challenge is about finding the smallest disk that contains some given points. This is made somewhat trickier, however, by the fact that in this challenge, the disk's coordinates and radius must both be integers.
Your input will be a list of points with integer coordinates `x` and `y`. You can take this as a list of tuples, a list of lists, or any other way to represent a collection of pairs. `x` and `y` will both be (possibly negative) integers. Every point is guaranteed to be unique, and there will be at least one point.
Your output will be a disk in the form of three numbers, `X`, `Y`, and `R`. `X`, `Y`, and `R` are all integers, `X` and `Y` represent the disk's center and `R` represents its radius. The distance between every given point and the center must be less than or equal to `R`, and there must not exist such a disk with a smaller `R` that also satisfies this condition.
It is possible that there will be multiple possible solutions for a given input, your code must output at least one of them in this case.
You can use any kinds of geometry builtins your language supports if there are any, and input/output may be through built-in point/disk objects instead of just numbers.
## Test Cases
```
Input   (Possible) Output(s)
(x,y)   (X,Y,R)
-------------------------
(0,0)   (0,0,0)
-------------------------
(0,1)   (0,0,1)
(1,0)   (1,1,1)
-------------------------
(1,4)   (4,4,3)
(3,2)
(4,1)
(4,5)
(5,2)
(7,4)
-------------------------
(-1,0)  (0,0,2)
(2,0)   (1,0,2)
-------------------------
(-1,0)  (1,0,2)
(2,1)   (0,1,2)
-------------------------
(0,0)   (1,0,1)
(1,1)   (0,1,1)
```
Fewest bytes wins.
  
[Answer]
# [Brachylog](https://github.com/JCumin/Brachylog) v2, 19 bytes
```
;Az{\-ᵐ~√ᵐ+}ᵐ≤ᵛ√;A≜
```
[Try it online!](https://tio.run/##SypKTM6ozMlPN/r/39qxqjpG9@HWCXWPOmYBKe1aIPGoc8nDrbOBAtaOjzrn/P8fHW2oYxirE22kYxwb@z8KAA "Brachylog – Try It Online")
This program was easy to write ­– Brachylog's almost perfect for this sort of problem – but hard to golf. It wouldn't surprise me if there was a byte saving somewhere here, as few things I did seemed to have any effect (and it contains nested map instructions, normally a sign that you should be using member/findall, but I can't see a way to do it).
This is a function submission. Input is from the left argument to the function in the format `[[x,y],[x,y],…]`, output from the right argument in the form `[r,[[x,y]]]`. (If you want to try negative numbers in the input, note that Brachylog uses `_` for the minus sign, not `-`. This is confusing because the function → full program wrapper that Brachylog ships with, requested using the command-line argument `Z`, will present negative numbers in the *output* with a regular minus sign.)
## Explanation
```
;Az{\-ᵐ~√ᵐ+}ᵐ≤ᵛ√;A≜
;A                   Append something
  z                    to every element of the input
   {       }ᵐ        such that for each resulting element:
     -                 Subtracting
    \ ᵐ                  corresponding elements {of the (input, appended) element}
       ~√              and un-squarerooting
         ᵐ               {the result of} each {subtraction}
          +            and summing {the resulting square numbers}
             ≤       {lets us find} a number at least as large as
              ᵛ        every element {of the list of sums}
               √     which can be square-rooted;
                ;A   append the same list as initially to it.
                  ≜  Find the first integer solution to the above, lexicographically.
```
This is interesting in that we're asking Brachylog to find a value of certain properties (in this case, the radius of a disk centred at point `A` that fits all the input points), but hardly placing any requirements on it (all we require is that the radius is a number). However, Brachylog will internally calculate the radius in question symbolically rather than trying to use concrete numbers, so when the final `≜` is reached, it accomplishes two things at once: first, it ensures that only integers are used for the coordinates of `A` and for the radius (forcing the squared radius to be a square number, and explaining the use of `≤ᵛ` to find a "maximum or greater"); second, it finds the smallest possible viable radius (as the radius comes first in the output).
One thing that isn't specified in the program at all is that all the points are measured against the same centre of a disk; as written, there are no constraints that we don't use a different centre for each point. However, the tiebreak order (which in this case is set by the third `ᵐ`, and which as a structure constraint will be evaluated before the value constraint implied by `≜`) wants `A` to be as short as possible (i.e. a single element, so we use the same centre each time; it tries a zero-length `A` first but that obviously doesn't work, so it tries a singleton list next). As a result, we end up getting a useful constraint (that we only have one disk) "for free".
This solution [happens to generalise to any number of dimensions](https://tio.run/##SypKTM6ozMlPN/r/39qxqjpG9@HWCXWPOmYBKe1aIPGoc8nDrbOBAtaOjzrn/P8fHW2oY6RjHKsTbaJjqmMGpE11jHUMY2P/RwEA), with no changes to the source code; there are no assumptions here that things are two-dimensional. So if you happen to need the smallest integer sphere, you can have that too.
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), ~~25~~ ~~24~~ ~~22~~ ~~21~~ ~~20~~ 18 bytes
```
«/r»/Œpµ³_²§½ṀĊ,)Ṃ
```
*Thanks to @EriktheOutgolfer for letting me know about `)`, saving 1 byte.*
*Thanks to @Dennis for saving 2 bytes.*
[Try it online!](https://tio.run/##y0rNyan8///Qav2iQ7v1j04qOLT10Ob4Q5sOLT@09@HOhiNdOpoPdzb9//8/WsNQx0RTR8NYxwhImugYgklTIGkKFjEHysYCAA "Jelly – Try It Online")
### Explanation
```
«/r»/Œpµ³_²§½ṀĊ,)Ṃ      Main link. Arg: points
                        e.g. [[1,4],[3,2],[3,1]]
«/                      Find minimums by coordinate
                        e.g. [1,1]
   »/                   Find maximums by coordinate
                        e.g. [3,4]
  r                     Inclusive ranges by coordinate
                        e.g. [[1,2,3],[1,2,3,4]]
     Œp                 Cartesian product of the x and y ranges
                        e.g. [[1,1],[1,2],[1,3],[1,4],...,[3,4]]
       µ                    Chain, arg: center
                            e.g. [1,3]
        ³                   Get the original points
                            e.g. [[1,4],[3,2],[3,1]]
         _                  Subtract the center from each
                            e.g. [[0,1],[2,-1],[2,-2]]
          ²                 Square each number
                            e.g. [[0,1],[4,1],[4,4]]
           §                Sum each sublist
                            e.g. [1,5,8]
            ½               Square root of each number
                            e.g. [1,2.24,2.83]
             Ṁ              Find the maximum
                            e.g. 2.83
              Ċ             Round up
                            e.g. 3
               ,            Pair with the center point
                            e.g. [3,[1,3]]
                )       Do the above for all points
                        e.g. [[3,[1,1]],[3,[1,2]],[3,[1,3]],...,[3,[3,4]]]
                 Ṃ      Find the lexicographically smallest pair
                        e.g. [3,[1,1]]
```
[Answer]
# [Perl 6](https://github.com/nxadm/rakudo-pkg), 81 bytes
```
{min [X]([Z]($^p)>>.minmax).map:{$p.map({(@_ Z-$_)>>².sum**.5}).max.ceiling,$_}}
```
[Try it online!](https://tio.run/##RYxRCoJAEIbfO8U@LDET4@KaFgRJxwjFREJDcG1RAkW8VEfoYtuuEj3983/zzeiyaw5GjWxbsbOZVN2y9JpBmmTAbxrjWFikigGFKvRp4tolTHDJWeLx3Aqft@hfarcT0eykQdzLuqnbB/F8nk1fjEzY39Wz2wD45CMhLZNEYiAtWLqk0PU9BS7CdRtS5CJa4dEqi@u5KwuC3/EfSETzBQ "Perl 6 – Try It Online")
Takes a list of points as 2-element lists `((X1, Y1), (X2, Y2), ...)`. Returns a list `(R, (X, Y))`. Uses the same approach as Pietu1998's Jelly answer:
```
[X]([Z]($^p)>>.minmax)  # All possible centers within the bounding box
.map:{ ... }            # mapped to
$p.map({(@_ Z-$_)>>².sum**.5}).max  # maximum distance from any point
.ceiling                # rounded up,
,$_                     # paired with center.
min                     # Find minimum by distance.
```
The `minmax` method is useful here as it returns a `Range`. The Cartesian product of ranges directly yields all points with integer coordinates.
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E/wiki/Commands), 26 [bytes](https://github.com/Adriandmen/05AB1E/wiki/Codepage)
```
øεWsàŸ}`âεUIεX-nOt}àîX‚}{н
```
Port of [*@Pietu1998*'s Jelly answer](https://codegolf.stackexchange.com/a/175406/52210).
[Try it online](https://tio.run/##yy9OTMpM/f//8I5zW8OLDy84uqM24fCic1tDPc9tjdDN8y@pPbzg8LqIRw2zaqsv7P3/Pzpa10RH1zRWJ1rXUEfXBEQb6@gagWhzKB8obwiiTUHisQA) or [verify all test cases](https://tio.run/##yy9OTMpM/V9Waa@k8KhtkoKSfWVY5P/DO85tDS8@vODojtqEw4vObQ2NPLc1QjfPv6T28ILD6yIeNcyqrb6w97/O/@joaAMdg9hYHQUQwzBWJ9oQxjXUMQFyjXWMgKQJWMpExxRImoJFzIGyYGW6IA060UYwbXC@IaYxxjBBXRMdXZBZQMW6IGldYx1dkAJdcygfKA@yUdcUJB4bCwA).
**Explanation:**
```
ø                    # Zip the (implicit) input, swapping the rows and column
                     #  i.e. [[1,4],[3,2],[3,1]] → [[1,3,3],[4,2,1]]
 ε    }              # Map each to:
  W                  #  Push the smallest value (without popping the list)
                     #   i.e. [[1,3,3],[4,2,1]] → [1,1]
   s                 #  Swap so the list is at the top of the stack again
    à                #  Pop the list and push the largest value
                     #   i.e. [[1,3,3],[4,2,1]] → [3,4]
     Ÿ               #  Take the inclusive range of the min and max
                     #   i.e. [[1,2,3],[1,2,3,4]]
`                    # After the map, push both lists separated to the stack
 â                   # And take the cartesian product of the two lists
                     #  i.e. [[1,2,3],[1,2,3,4]]
                     #   → [[1,1],[1,2],[1,3],[1,4],[2,1],[2,2],[2,3],[2,4],[3,1],[3,2],[3,3],[3,4]]
  ε             }    # Map each pair to:
   U                 #  Pop and store the current value in variable `X`
    I                #  Push the input
     ε     }         #  Map each pair in the input to:
      X              #   Push variable `X`
       -             #   Subtract it from the current pair
                     #    i.e. [3,2] - [1,3] → [2,-1]
        n            #   Take the square of each
                     #    i.e. [2,-1] → [4,1]
         O           #   Sum the lists
                     #    i.e. [4,1] → 5
          t          #   Take the square-root of each
                     #    i.e. 5 → 2.23606797749979
            à        #  Pop the converted list, and push its largest value
                     #   i.e. [[3.0,2.23606797749979,2.0],[2.0,2.0,2.23606797749979],...,[2.0,2.0,3.0]]
                     #    → [3.0,2.23606797749979,...,3.0]
             î       #  Round it up
                     #   i.e. [3.0,2.23606797749979,...,3.0] → [3.0,3.0,3.0,4.0,4.0,3.0,3.0,4.0,4.0,3.0,3.0,3.0]
              X‚     #  Pair it with variable `X`
                     #   i.e. [[3.0,[1,1]],[3.0,[1,2]],...,[3.0,[3,4]]]
                 {   # After the map, sort the list
                  н  # And take the first item (which is output implicitly)
                     #  i.e. [[3.0,[1,1]],[3.0,[1,2]],...,[3.0,[3,4]]] → [3.0,[1,1]]
```
[Answer]
# Matlab, 73 bytes
```
function g(x);[r,~,d]=fminimax(@(a)pdist2(x,a),[0 0]);[round(r) ceil(d)]
```
Simply find the smallest solution (floating point) and round to nearest point and ceil the radius (worst case for the minimax problem). I don't know for sure if that yields the correct solution for all possible cases (within the precision), but for the test cases it should work (if I didn't make a typing error).
Call it with
```
g([1 4;3 2;4 1;4 5;5 2;7 4])
```
[Answer]
# [Pyth](https://github.com/isaacg1/pyth), ~~34~~ 33 bytes
```
hSm+.EeSm@s^R2-Vdk2Qd*Fm}FhM_BSdC
```
Output is in the form `[R,x,y]`
Try it online [here](https://pyth.herokuapp.com/?code=hSm%2B.EeSm%40s%5ER2-Vdk2Qd%2AFm%7DFhM_BSdC&input=%5B%5B1%2C4%5D%2C%5B3%2C2%5D%2C%5B4%2C1%5D%2C%5B4%2C5%5D%2C%5B5%2C2%5D%2C%5B7%2C4%5D%5D&debug=0), or verify all the test cases at once [here](https://pyth.herokuapp.com/?code=hSm%2B.EeSm%40s%5ER2-Vdk2Qd%2AFm%7DFhM_BSdC&test_suite=1&test_suite_input=%5B%5B0%2C0%5D%5D%0A%5B%5B0%2C1%5D%2C%5B1%2C0%5D%5D%0A%5B%5B1%2C4%5D%2C%5B3%2C2%5D%2C%5B4%2C1%5D%2C%5B4%2C5%5D%2C%5B5%2C2%5D%2C%5B7%2C4%5D%5D%0A%5B%5B-1%2C0%5D%2C%5B2%2C0%5D%5D%0A%5B%5B-1%2C0%5D%2C%5B2%2C1%5D%5D&debug=0).
```
hSm+.EeSm@s^R2-Vdk2Qd*Fm}FhM_BSdCQ   Implicit: Q=eval(input())
                                     Trailing Q inferred
                                CQ   Transpose (group x and y coordinates separately)
                       m             Map each in the above, as d, using:
                              Sd       Sort d
                            _B         Pair with its own reverse
                          hM           Take the first element of each, yielding [min, max]
                        }F             Generate inclusive range
                     *F              Cartesian product of the above two lists, yielding all coordinates in range
  m                                  Map each coordinate in the above, as d, using:
        m          Q                   Map each coordinate in input, as k, using:
              -Vdk                       Take the difference between x and y coordinates in d and k
           ^R2                           Square each
          s                              Sum
         @        2                      Take the square root
      eS                               Take the largest of the result
    .E                                 Rounded up
   +                d                  Prepend to d
 S                                   Sort the result, first element as most significant
h                                    Take first element
```
*Edit: Saved a byte by rearranging output format, previous version:*
`heDm+d.EeSm@s^R2-Vdk2Q*Fm}FhM_BSdC`
[Answer]
# [Wolfram Language (Mathematica)](https://www.wolfram.com/wolframscript/), 66 bytes
Here's a brute force approach. I considered the much shorter `BoundingRegion[#,"MinDisk"]&` function but there is no way to force integer coordinates & radius.
```
Minimize[{r,RegionWithin[{x,y}~Disk~r,Point@#]},{x,y,r},Integers]&
```
[Try it online!](https://tio.run/##y00syUjNTSzJTE78n2b73zczLzM3syo1urpIJyg1PTM/LzyzJCMzL7q6Qqeyts4lszi7rkgnID8zr8RBObZWBySsU1Sr45lXkpqeWlQcq/Y/oAgoGZ3mUF1tqGMCVGGsYwQkTXQMwaQpkDQFi5gDZWtjrf8DAA "Wolfram Language (Mathematica) – Try It Online")
[Answer]
# Java 10, ~~283~~ ~~279~~ ~~277~~ 257 bytes
```
C->{int M=1<<31,m=M,X=M,Y=M,x=M-1,y=x,t,a,b,r[]={x};for(var c:C){x=(t=c[0])<x?t:x;X=t>X?t:X;y=(t=c[1])<y?t:y;Y=t>Y?t:Y;}for(;y<=Y;y++)for(t=x;t<=X;r=m<r[0]?new int[]{m,t,y}:r,m=M,t++)for(var c:C){a=c[0]-t;b=c[1]-y;a*=a;m=(a=(int)Math.ceil(Math.sqrt(a+=b*=b)))>m?a:m;}return r;}
```
-20 bytes thanks to *@nwellnhof*'s tip of using [`Math.hypot`](https://docs.oracle.com/javase/8/docs/api/java/lang/Math.html#hypot-double-double-).
The result-array is in the order `[R,X,Y]`.
[Try it online.](https://tio.run/##jVJLb@IwEL73V/hoq3ZECqgSjkErzumll0SIg2vSbdg8kDOwsSL/dnYc0mql3UV78Hje8/nzHPVFi@Phx9VUuutIqstmeCCkbKCw79oU5CWYo2O3J4aON2pbJtHvH1B0oKE05IU0RJHrVqwHTCKpipNkHvNapTzDk@PpVSpi7lTPgWtud3s19F6@t5ZetCVmtWVDrygos5vtWdJvYNXLTME6Qy2T7haKMeTQ4WSOoRy1XPrQQ7pE5dI9PrJggeolJCqTVtWJxYabpvh5e8ZQ43znV3YEB1PBJ4RaUa3CO1mq4SMyRVnRUftwpxZowCaABxzCMcbW9UavamkLONuGWOmvMpByOr9VSMrEzaUtD6RGbukr2LL5jgRqdiMWig7oFzQEN8z4zPuR3r9HY8@H@G5OzBeYM@dPKBdj/oIvUS5HzzNG/10rQms@PN0d8JUU/yeK@d1MseAi4MO2ItSIORehSjxPNsbDK8Qy@P0fqzfSO7b9XE/TtvZQNhqdE8@vroOijtozRCf8AqgaesTdj85QVtE3a7XrImhv30ObyNDfW7BppL/@Ag)
**Explanation:**
```
C->{                  // Method with 2D int-array as parameter & int-array as return-type
  int M=1<<31,        //  Minimum `M`, starting at -2,147,483,648
      m=M,            //  Temp integer, starting at -2,147,483,648 as well
      X=M,            //  Largest X coordinate, starting at -2,147,483,648 as well
      Y=M,            //  Largest Y coordinate, starting at -2,147,483,648 as well
      x=M-1,          //  Smallest X coordinate, starting at 2,147,483,647
      y=x,            //  Smallest Y coordinate, starting at 2,147,483,647 as well
      t,a,            //  Temp integers, starting uninitialized
      r[]={x};        //  Result-array, starting at one 2,147,483,647
  for(var c:C){       //  Loop over the input-coordinates
    x=(t=c[0])<x?t:x; //   If the X coordinate is smaller than `x`, change it
    X=t>X?t:X;        //   If the X coordinate is larger than `X`, change it
    y=(t=c[1])<y?t:y; //   If the Y coordinate is smaller than `y`, change it
    Y=t>Y?t:Y;}       //   If the Y coordinate is larger than `Y`, change it
 for(;y<=Y;y++)       //  Loop `y` in the range [`y`,`Y`]:
   for(t=x;t<=X       //   Inner loop `t` in the range [`x`,`X`]:
          ;           //     After every iteration:
           r=m<r[0]?  //      If `m` is smaller than the first value:
              new int[]{m,t,y}
                      //       Replace the result with `m,t,y`
             :        //      Else:
              r,      //       Leave `r` unchanged
           m=M,       //      Reset `m` to -2,147,483,648 for the next iteration
           t++)       //      And increase `t` by 1
     for(var c:C)     //    Inner loop over the input-coordinates
       m=(a=(int)Math.ceil(Math.hypot(c[0]-t,c[1]-y)))
                      //     Subtract `t` from the X coordinate;
                      //     subtract `y` from the Y coordinate;
                      //     take the hypot (<- sqrt(x*x+y*y)) of those
                      //     ceil it
                      //     And set `a` to this value
          >m?         //     If `a` is larger than `m`:
           a          //      Set `m` to `a`
          :           //     Else:
           m;         //      Leave `m` unchanged
  return r;}          //  Return the result `r`
```
[Answer]
# Javascript, 245 bytes
```
a=>{[b,c,d,e]=a.reduce(([j,k,l,m],[h,i])=>[j>h?j:h,k<h?k:h,l>i?l:i,m<i?m:i],[,,,,]);for(f=c;f<b;f++){for(g=e;g<d;g++){s=a.reduce((o,[p,q])=>o>(r=(p-f)**2+(q-g)**2)?o:r);n=n?n[2]>s?[f,g,s]:n:[f,g,s]}}return [n[0],n[1],Math.ceil(Math.sqrt(n[2]))]}
```
(Somewhat) more readable version:
```
a=>{
    [b,c,d,e]=a.reduce(([j,k,l,m],[h,i])=>[j>h?j:h,k<h?k:h,l>i?l:i,m<i?m:i],[,,,,]);
    for(f=c;f<b;f++){
        for(g=e;g<d;g++){
            s=a.reduce((o,[p,q])=>o>(r=(p-f)**2+(q-g)**2)?o:r);
            n=n?n[2]>s?[f,g,s]:n:[f,g,s]
        }
    }
    return [n[0],n[1],Math.ceil(Math.sqrt(n[2]))]
}
```
Just finds the bounding box, and tests each coordinate in that box for whether it's the best.
I could save 8 bytes with an approximate answer, by replacing:
`Math.ceil(Math.sqrt(n[2]))` with `~~(n[2]+1-1e-9)`
[Answer]
# [Ruby](https://www.ruby-lang.org/), 113 bytes
```
->l{a=l.flatten;(z=*a.min..a.max).product(z).map{|x,y|[l.map{|u,v|(((x-u)**2+(y-v)**2)**0.5).ceil}.max,x,y]}.min}
```
[Try it online!](https://tio.run/##JYzBDoMgEER/pUew66ZaTQ/G/gjhQK0mJtQSIwYUvp2u9rBvZ2eyM9uXT0Ob8qfeVatx0GpZ@qlhW5sp/IwTIi3lOJr5@7bdwjZOt9mDAx@E/msLa2CMudzyLCuvzOfrIWhuWHPs@lHHowXoScajNiZzGYQQBVQSxB1KYgXFyZpYn86DUinTDw "Ruby – Try It Online")
[Answer]
# [Charcoal](https://github.com/somebody1234/Charcoal), 65 bytes
```
≔Ｅθ§ι¹ζ≔Ｅθ§ι⁰ηＦ…·⌊η⌈ηＦ…·⌊ζ⌈ζ⊞υ⟦ικ⟧≔Ｅυ⌈ＥθΣＥιＸ⁻§λξν²ηＩ§υ⌕η⌊ηＩ⌈Ｘ⌊η·⁵
```
[Try it online!](https://tio.run/##fY8xa8MwEIV3/wqNJ1BLnMR06BQCgQwGk47Cg3BU64giJ5aVGv95RYpdtxnag@Mdx8e9d5USbdUI7f3GWqwN5OICV0Y23d4cZQ/ISEopIwN9T/4kFpFQgfhsWgJ7U2ln8SYPwtQScjR4dmdQgclFP82Ukv/g4Rc8RLhwVoFjhAe7U/kcxv2wU7aPaQxw0XzJNt51Fr4ja0b6YGBCL@mjxvhFi6aDrbDdjIbbOzRHUMFjfiTWE72VqNHUMJvNHy9eswftPecJT9m6ZAlfsWWUNUtHyaJk4/ItIElZ@pebvgM "Charcoal – Try It Online") Link is to verbose version of code. Explanation:
```
≔Ｅθ§ι¹ζ
```
Get the y-coordinates into `z`.
```
≔Ｅθ§ι⁰η
```
Get the x-coordinates into `h`.
```
Ｆ…·⌊η⌈ηＦ…·⌊ζ⌈ζ⊞υ⟦ικ⟧
```
Loop over the inclusive ranges from the minimums to the maximums of `h` and `z` generating the list of all potential disc centres.
```
≔Ｅυ⌈ＥθΣＥιＸ⁻§λξν²η
```
Loop over all the disc centres, then loop over all of the original points, then loop over both coordinates, subtract, square, sum, take the maximum, and save the resulting list.
```
Ｉ§υ⌕η⌊η
```
Find the position of the minimal maximum diameter and print the corresponding disc centre.
```
Ｉ⌈Ｘ⌊η·⁵
```
Print the minimal maximum diameter, but round it up to the next integer.
]