Skip to content

Instantly share code, notes, and snippets.

@vhxs
Created October 23, 2022 01:47
Show Gist options
  • Save vhxs/04db3e691407f0f9df0d55b7415bf588 to your computer and use it in GitHub Desktop.
Save vhxs/04db3e691407f0f9df0d55b7415bf588 to your computer and use it in GitHub Desktop.
testing ceiling inequality
# The following inequality doesn't hold for all x, y \in \mathbb{R}. Does it hold for x, y \in mathbb{N}?
# Here's a bruteforce test for 1 <= x, y <= 1000
import math
for x in range(1, 1000):
for y in range(1, 1000):
assert y >= math.ceil(x / math.ceil(x / y))
@vhxs
Copy link
Author

vhxs commented Oct 23, 2022

Evidence that this inequality fails in general over the reals:

Screen Shot 2022-10-22 at 9 45 12 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment