This my basic, no-frills blog. It contains both posts about math and other topics. Lately, they've mostly been about linux and vim. I eventually intend to add in a tag and category based word-cloud so that the blog is easier to navigate.

Tag Cloud


Fall 2018 Activity

This was my first ever semester at the University of Rochester. I had only one class to teach, and thankfully, it was one I’d done before: MTH 201, Introduction to Probability. I spent most of September getting settled, and buying books and computers for my office.

I visited Ido Ben-Ari at the University of Connecticut on Sep 8 2017. I spoke about my joint work with Jon Chaika (University of Utah) that I’m quite excited about. It’s a generalized description of the collective behavior of random, semi-infinite walks on the lattice. The two major assumptions on the walks are that they have to coalesce if they meet. Under some very mild assumptions, we prove a striking dichotomy theorem: either all the walks coalesce, or they form biinfinite trajectories with an asymptotic velocity that foliate the space. We built this theory to understand the behavior of geodesics in first- and last-passage percolation. We use a lot of tools from ergodic theory, and I learned a lot from Jon. We also construct a bunch of examples. Our main example is a first-passage model with non-crossing geodesics that do have asymptotic direction.

It was almost by accident that I met Jon. I had this general framework that I thought would be a useful way to understand the behavior of generalized ‘Busemann functions’ in first- and last-passage percolation. Generalized Busemann functions appear as minimizers in the newly discovered variational formulas for first- and last-passage percolation (Georgiou, Rassoul-Agha, Seppalainen, Comm. Math. Phys 2016, and Krishnan, Comm. Pure Appl. Math., 2016). Luckily, the first ergodic theorist I randomly approached at Utah was an amazing mathematician. There is a typo-ridden draft on the arXiv, but we have a new version that we’re almost ready to send out for review.

I spent October putting together my NSF grant. It was on the properties of the Busemann functions I mentioned. It was my first time writing a grant about this project, and it took a while to put together.

I spent a part of November working on a project with an undergraduate student that I advised at the University of Utah. We spent some time refining our writeup and sending it out to people. Scott came up with the idea for the project: it’s on a connection between colored non-crossing partitions (see Marberg, Eric (2013) ‘Crossings and nestings…’, MR3139391), longest increasing subsequences constrained to be smaller than a certain number, and certain special Kostka numbers. Kostka numbers appear in the theory of symmetric functions in a seemingly unrelated context. We worked on cleaning up and writing Scott’s bijection between Kostka numbers and longest increasing subsequences constrained to be smaller than a certain number. I’m mainly interested in the combinatorics because of the connection between longest increasing subsequences and several classical models in probability.

We wrote to a few experts about the results, and it seems that some parts of it ought to be well-known. However, some of our generalizations appear to be new. The most interesting thing for us, at least, it to connect the Kostka numbers to colored non-crossing partitions. We’ve made some progress, but we’re not really close to anything. So its not quite ready to publish, but it’s certainly a very good start for Scott. He’s just applied to grad schools this year. He won the prestigious Churchill scholarship to spend a year at Cambridge. He intends to learn more about analytic and algebraic combinatorics there.

I also attended the North East Probability Seminar at Columbia in mid-November. I really enjoyed Hugo Duminil-Copins talk, and want to look into this paper of Schramm that he mentioned. It has a cool new inequality in it. I also had a chance to speak to LP Arguin, and we’re collaborating on a project in log-correlated fields and spin glasses.

Jeremy Quastel and I discovered a small hiccup in a paper that is under review. We were using a theorem from Borodin, Corwin, Ferrari and Veto 2013 that isn’t quite right. We spent a bit of time fixing it, and incorportating the referees suggestions. We hope to be done in the next few weeks.

Securely erase a server

I recently had to securely erase a server that I had only ssh access to. I was worried that running

rm -rf --no-root-preserver /

would cause a kernel panic and not erase the drive properly. One way to overcome this problem would be to create a ramdisk. Since ramdisks are stored in memory, it should be able to successfully erase this root filesystem.

mkdir -p /dev/shm/ramdisk/bin /dev/shm/ramdisk/dev /dev/shm/ramdisk/lib64 /dev/shm/ramdisk/usr/lib
cp /bin/dd /bin/bash /bin/ls /dev/shm/ramdisk/bin
ldd /bin/bash

and then copy all the necessary libraries to

cp /dev/shm/ramdisk/lib

or the appropriate directory like lib64 or usr/lib. Then mount bind your dev directory

mount -o bind /dev/ /dev/shm/ramdisk/dev

Chroot into the ramdisk

chroot /dev/shm/ramdisk/dev

Then simply run

dd if=/dev/zero of=/dev/sda bs=1M

pv is usually faster than dd, so you can use that instead.

Some people say that its necessary to go over old hardware with bytes other than zeros, and that you would have to make multiple passes. But I do not think it is necessary. See this article

https://security.stackexchange.com/questions/10464/why-is-writing-zeros-or-random-data-over-a-hard-drive-multiple-times-better-th

The article just simply says “just write it with zeros and forget it. Some storage media have a secure erase feature that you could activate using

hdparm --security-erase

On ssds, security erasing is a lot harder. One would have to this quite carefully, I would imagine.

Vim scrolls very slowly

My vim version

VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Sep  5 2017 11:27:38)
Included patches: 1-987
Compiled by Arch Linux

has been hit by a weird scrolling bug when

:set cursorline

or

:set relativenumber

is set. This is some regexp computation
bug

according to stackoverflow. I've simply disabled these things unless I
need to use them.

Tail probabilities of Gaussians

There are many many tail probabilities for the Gaussian, and most use
some form of integration by parts. Duembgen’s paper on bounding
standard tail probabilities
has
several, for example.

Let
$$\Prob( X \geq t) = T(t) = \int_{t}^{\infty} \exp(-x^2/2) \frac{1}{\sqrt{2\pi}} dx$$
Two simple inequalities obtained by integration by parts are:
$$\begin{aligned}
\frac{1}{\sqrt{2\pi}} \exp(-t^2/2) \left(\frac{1}{t} - \frac{1}{t^3}\right) \leq T(t) \leq \frac{1}{t} \exp(-t^2/2) \end{aligned}$$
Fleshed out versions of these calculations can be found anywhere; see
https://mikespivey.wordpress.com/2011/10/21/normaltails/.
Essentially one simply introduces $x/t$ into the integrand to obtain an
upper bound. The integrand now has a simple anti-derivative.

Here is a better bound, using a slightly cooler trick of introducing a
new independent variable.

Introduce an independent Gaussian variable $Y$ and consider
$T(t) = \Prob( Y \in \R, X \geq t)$ again. This is bounded above by the
probability of the exterior of the circle: $$\begin{aligned}
\Prob( Y \in \R, X \geq t)
& \leq \Prob( X^2 + Y^2 \geq t^2)\
& = \frac1{2 \pi} \int_t^{\infty} r e^{-r^2/2} dr \
& = \frac1{2 \pi} e^{-t^2/2} \end{aligned}$$ Certainly
$\frac1{2\pi} \leq \frac12$; this is the bound that appears frequently
in papers: $$
\frac{1}{L(1 + t)} \exp\left( -\frac{t^2}{2}\right) \leq T(t) \leq \frac{1}{2} \exp\left( -\frac{t^2}{2} \right).
$$ I haven’t worked out the details of the lower bound, but I assume
it’s quite similar.

Using the iMac 27" (late 2011) as an external monitor

I had an extra iMac 27" (late 2011) that I wanted to use as a monitor
with my thinkpad that runs linux. This is quite easy to do and involves
something called Target display mode that the iMac can be put into.
I was concerned that this was a Mac-only mode and that it wouldn't work
on linux.

There are two computers involved:

thinkpad:   drives the imac, runs linux
imac 27":   works as an external display, has os x installed and an apple keyboard connected to it. 
  1. First visit this page on apple's website and determine
    what kind of connectors are supported in your imac. My thinkpad and
    imac both have a mini display port connector. I bought one off
    amazon for about \$15.
  2. Then install the arandr, and autorandr utilities on your linux box.
    I use the newer fork of autorandr written in
    python
    . arandr is a gui
    that makes things a little easier.
  3. On the linux box, run the command,
        while :; do xrandr | grep '
    

    This should display a messages that shows what monitors are
    connected

  4. Hit command + F2 on your imac to put it into target display mode.
    You should see new "connected" messages appearing on your linux box.
  5. At the same time, simultaneously run arandr, and hit activate on
    your the arandr menu. This will automatically enable the external
    monitor. You only have a window of about 5 seconds from when you hit
    command + F2 on your imac until you activate the display on your
    linux box. The alternative to using arandr is to have a command like
    the following entered into a terminal that you're ready to hit enter
    on:

    xrandr --output eDP1 --mode 1920x1080 --output DP2-2 --mode 2560x1440
    

    The problem with the latter method is that it requires you to know
    the name that your display will be detected as. IN this case, it was
    detected as DP2-2. I suppose, a priori, it ought to be possible to
    determine what port the monitor is connected to, but I don't know
    how.

  6. This should activate the imac as an external display. Now you want
    it to be automatically put into this display setting as soon as it
    is detected. This is where the autorandr script and its udev rules
    (that detect the external monitor being connected) come into play. I
    used

    autorandr -s imac-external
    

    Then if you're on a systemd based distribution enable the
    autorandr.service and start it up with

    systemctl start autorandr
    systemctl enable autorandr
    

    both run as the root user. Make sure you've put the appropriate rule
    into

    /usr/lib/udev/rules.d/40-monitor-hotplug.rules
    

    Then reload your udev rules using

    udevadm control --reload-rules
    

Now your imac should be automatically detected and turned on when you 1)
turn on target display mode by hitting command + F2 and 2) connect
your laptop/desktop to the imac.

; date '+%T'; sleep 2s; done

This should display a messages that shows what monitors are
connected

  • Hit command + F2 on your imac to put it into target display mode.
    You should see new "connected" messages appearing on your linux box.
  • At the same time, simultaneously run arandr, and hit activate on
    your the arandr menu. This will automatically enable the external
    monitor. You only have a window of about 5 seconds from when you hit
    command + F2 on your imac until you activate the display on your
    linux box. The alternative to using arandr is to have a command like
    the following entered into a terminal that you're ready to hit enter
    on:

    xrandr --output eDP1 --mode 1920x1080 --output DP2-2 --mode 2560x1440
    

    The problem with the latter method is that it requires you to know
    the name that your display will be detected as. IN this case, it was
    detected as DP2-2. I suppose, a priori, it ought to be possible to
    determine what port the monitor is connected to, but I don't know
    how.

  • This should activate the imac as an external display. Now you want
    it to be automatically put into this display setting as soon as it
    is detected. This is where the autorandr script and its udev rules
    (that detect the external monitor being connected) come into play. I
    used

    autorandr -s imac-external
    

    Then if you're on a systemd based distribution enable the
    autorandr.service and start it up with

    systemctl start autorandr
    systemctl enable autorandr
    

    both run as the root user. Make sure you've put the appropriate rule
    into

    /usr/lib/udev/rules.d/40-monitor-hotplug.rules
    

    Then reload your udev rules using

    udevadm control --reload-rules
    
  • Now your imac should be automatically detected and turned on when you 1)
    turn on target display mode by hitting command + F2 and 2) connect
    your laptop/desktop to the imac.