This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
from collections import namedtuple | |
import time | |
import gurobipy as gp | |
from gurobipy import GRB | |
import matplotlib.pyplot as plt | |
from matplotlib.patches import Rectangle | |
import json | |
with open("gurobi.lic", "r") as f: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "@preview/cetz:0.2.0" | |
#let proof(root) = { | |
cetz.canvas({ | |
import cetz.draw: * | |
let min(..a) = { | |
let a = a.pos().filter(v => v != none) | |
return calc.min(..a) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from math import sqrt, ceil, gcd, comb, log, exp | |
import subprocess | |
import time | |
def gen(size, delta_list): | |
while True: | |
p = random_prime(2^(size//2), lbound=2^(size//2-1)) | |
q = random_prime(2^(size//2), lbound=2^(size//2-1)) | |
if gcd(p-1, q-1) == 2: |