## Node depth in randomly built binary search tree

It can be proved that randomly built binary search trees of size $$n$$ are of depth $$O(log(n))$$ and it is clear that level $$k$$ has at most $$2^{k}$$ nodes (root’s level is 0).

I have an algorithm that traverses every path in the tree (beginning at the root) but stops after traversing $$k$$ nodes (the parameter $$k$$ is a configurable parameter which is independent of the size of the tree $$n$$).

For any tree $$T$$ with $$depth(T) > k$$, the algorithm will miss some nodes of the tree. I would like to bound the probability of my algorithm missing a large number of nodes.

Formalizing it: let $$T$$ be a randomly built binary search tree of $$n$$ nodes. I would like to calculate the probability for a node to have depth larger than $$k$$, as a function of $$n$$ and $$k$$.

## Bluetooth Randomly Stopped

I’m using a Developer, Ubuntu shipped with it pre-installed Dell Precision 7530. Today while working, my bluetooth speakers beeped indicating they disconnected, I went to reconnect and in the bluetooth settings it’s saying “No Bluetooth Found. Plug in a dongle to use Bluetooth.” – except I’ve been using bluetooth for the entire 6 months I’ve owned the laptop so there absolutely is a dongle. I’ve restarted the computer several times, including fully off/on, and nothing. I’m at a loss. Any suggestions here?

I’ve seen other chats about bluetooth not working but they tend to be people that upgraded recently etc. – I haven’t. It just STOPPED after working fine and flawlessly.

I’m on Ubuntu 18.04 LTS.

## Num Lock randomly turns on, possibly only on Visual Studio Code

My situation is similar to the one posted here: Num Lock Key Randomly Turning On and Off, except, so far, I have only observed this random toggling when I am writing on Visual Studio Code. In other parts and on normal usage, I have not observed this happening.

So, in any regular writing session, I would suddenly find myself typing in numbers, when I wanted to just move around the text. Does anyone have any idea why this is happening, please?

Here’s some information that might help:

• Ubuntu 19.04.3

Version: 1.38.1 Commit: b37e54c98e1a74ba89e03073e5a3761284e3ffb0 Date: 2019-09-11T13:30:08.229Z Electron: 4.2.10 Chrome: 69.0.3497.128 Node.js: 10.11.0 V8: 6.9.427.31-electron.0 OS: Linux x64 5.0.0-31-generic snap 

If this isn’t the best forum for this question, please let me know and I’ll head there. I wish this problem to be solved the soonest possible because this gets really annoying.

## Ubuntu logging user out/going to 2nd screen randomly?

By this I mean what you get when you press CTRL+ALT+F2.

I’ll just start the computer, log in and after a few seconds, it takes me back to the login screen and I’ll be on that screen.

No idea what this behavior is even called.

Does anyone have experience with this?

## wifi randomly dies on fresh install of ubuntu 18.04.1

My wifi randomly cuts out and stays dead until I reboot. This seems to happen after about 5 or 10 minutes. I’ve tried all the many dozens of solutions posted on this forum for this, but none avail. When I boot in windows mode, wifi works fine. Funny thing is I have linux versions that are one and two decades old, and they work fine. I have wifi sleep turned off, as well as a bunch of other things. I’m getting a lot of these errors when this happens. It looks like there might be a problem with the way DMA is being attempted:

ath: phy0: DMA failed to stop in 10 ms AR_CR=0xffffffff AR_DIAG_SW=0xffffffff DMA

ath: phy0: Chip reset failed ath: phy0: Unable to reset channel, reset status -22 ath: phy0: Chip reset failed

Any help is greatly appreciated. I’ve literally tried dozens of solutions on this forum and none have helped. I’d really like to be up and running with a modern version of linux as the supplied compilers and other things could be much improved.

We have some users reported they cannot upload files to a document library. They are using Chrome and drag/drop some files. Total file size is less than 10MB. After drag the files to the document library, an error

Sorry, your files couldn’t be uploaded. The upload might be too large or the server might be experiencing high network traffic.

show up.

We are using SP2016 on-premise. The ULS logs are:

Exception occured in scope Microsoft.SharePoint.SPFile._SerializeToJson. Exception=System.IO.FileNotFoundException: The system cannot find the file specified. (Exception from HRESULT: 0x80070002)

SocialRESTExceptionProcessingHandler.DoServerExceptionProcessing – SharePoint Server Exception [System.IO.FileNotFoundException: The system cannot find the file specified. (Exception from HRESULT: 0x80070002) Unknown SPRequest error occurred. More information: 0x80070002

## Is there any scenario whereby randomly shufflying a sequence improves it’s compressibility?

I’m performing some correlation assessment à la NIST Recommendation for the Entropy Sources Used for Random Bit Generation, § 5.1.

You take a test sequence and compress it with a standard compression algorithm. You then shuffle that sequence randomly using a PRNG, and re-compress. We expect that the randomly shuffled sequence to be harder to compress as any and all redundancy and correlations will have been destroyed. It’s entropy will have increased.

So if there is any auto correlation, $$\frac{\text{size compressed shuffled}} {\text{size compressed original}} > 1$$ .

This works using NIST’s recommended bz2 algorithm, and on my data samples, the ratio is ~1.03. This indicates a slight correlation within the data. When I switch to LZMA, the ratio is ~0.99 which is < 1. And this holds over hundreds of runs so it’s not just a stochastic fluke.

What would cause the LZMA algorithm to repetitively compress a randomly shuffled sequence (slightly) better than a non shuffled one?

## “An error occurred when navigating to:” error occurs randomly approximately every third time certain users try to access particular documents

At my company, certain users, when trying to access documents via links outside of our SharePoint environment, are getting an error saying “An error occurred when navigating to:…”. This error is happening for the users irregularly. If they get the error and then click the link again, the error goes away and they get access to the document. I am not an expert in SharePoint, but would this imply that one of our content servers in our load balance is not working properly while the others ARE working? Can anyone tell me how I could go about solving this issue? Any thoughts or comments would be appreciated!

## Ubuntu 18.04 Gnome shell crashing randomly

I am running a clean install of 18.04 on a Dell Inspiration desktop with a Nvidia Quadro FX1800 graphics card. Every so often – most days – my GNOME session just ends, logging me out. There is no obvious pattern to this in terms of actions or open programs. The last time I was just moving the mouse. The trace from syslog is long, but having looked at a few of them the following seem to be common features:

Aug 28 13:36:55 mill /usr/lib/gdm3/gdm-x-session[2616]: (EE) glamor0: GL error: GL_OUT_OF_MEMORY in glTexSubImage Aug 28 13:36:55 mill /usr/lib/gdm3/gdm-x-session[2616]: (WW) glamor: Failed to allocate 7x12 FBO due to GL_OUT_OF_MEMORY. Aug 28 13:36:55 mill /usr/lib/gdm3/gdm-x-session[2616]: (WW) glamor: Expect reduced performance. Aug 28 13:36:55 mill /usr/lib/gdm3/gdm-x-session[2616]: (EE) Aug 28 13:36:55 mill /usr/lib/gdm3/gdm-x-session[2616]: (EE) Backtrace: Aug 28 13:36:55 mill /usr/lib/gdm3/gdm-x-session[2616]: (EE) 0: /usr/lib/xorg/Xorg (OsLookupColor+0x139) [0x55ef0cc59829] Aug 28 13:36:55 mill /usr/lib/gdm3/gdm-x-session[2616]: (EE) 1: /lib/x86_64-linux-gnu/libpthread.so.0 (funlockfile+0x50) [0x7f86e5d158df] Aug 28 13:36:55 mill /usr/lib/gdm3/gdm-x-session[2616]: (EE) 2: /usr/lib/xorg/modules/libglamoregl.so (glamor_get_pixmap_texture+0x7d) [0x7f86e27b257d] Aug 28 13:36:55 mill /usr/lib/gdm3/gdm-x-session[2616]: (EE) 3: /usr/lib/xorg/modules/libglamoregl.so (glamor_create_gc+0x78f4) [0x7f86e27c4664] Aug 28 13:36:55 mill /usr/lib/gdm3/gdm-x-session[2616]: (EE) 4: /usr/lib/xorg/modules/libglamoregl.so (glamor_create_gc+0x7caf) [0x7f86e27c4d8f] Aug 28 13:36:55 mill /usr/lib/gdm3/gdm-x-session[2616]: (EE) 5: /usr/lib/xorg/modules/libglamoregl.so (glamor_create_gc+0x8668) [0x7f86e27c58a8] Aug 28 13:36:55 mill /usr/lib/gdm3/gdm-x-session[2616]: (EE) 6: /usr/lib/xorg/modules/libglamoregl.so (glamor_create_gc+0xa26f) [0x7f86e27c909f] Aug 28 13:36:55 mill /usr/lib/gdm3/gdm-x-session[2616]: (EE) 7: /usr/lib/xorg/Xorg (DamageRegionAppend+0x6c6) [0x55ef0cbdcb46] Aug 28 13:36:55 mill /usr/lib/gdm3/gdm-x-session[2616]: (EE) 8: /usr/lib/xorg/modules/libglamoregl.so (glamor_create_gc+0x1111f) [0x7f86e27d749f] Aug 28 13:36:55 mill /usr/lib/gdm3/gdm-x-session[2616]: (EE) 9: /usr/lib/xorg/Xorg (AddTraps+0x423d) [0x55ef0cbd576d] Aug 28 13:36:55 mill /usr/lib/gdm3/gdm-x-session[2616]: (EE) 10: /usr/lib/xorg/Xorg (SendErrorToClient+0x368) [0x55ef0cafc548] Aug 28 13:36:55 mill /usr/lib/gdm3/gdm-x-session[2616]: (EE) 11: /usr/lib/xorg/Xorg (InitFonts+0x3c8) [0x55ef0cb00528] Aug 28 13:36:55 mill /usr/lib/gdm3/gdm-x-session[2616]: (EE) 12: /lib/x86_64-linux-gnu/libc.so.6 (__libc_start_main+0xe7) [0x7f86e5933b97] Aug 28 13:36:55 mill /usr/lib/gdm3/gdm-x-session[2616]: (EE) 13: /usr/lib/xorg/Xorg (_start+0x2a) [0x55ef0caea18a] Aug 28 13:36:55 mill /usr/lib/gdm3/gdm-x-session[2616]: (EE) Aug 28 13:36:55 mill /usr/lib/gdm3/gdm-x-session[2616]: (EE) Segmentation fault at address 0x0 Aug 28 13:36:55 mill /usr/lib/gdm3/gdm-x-session[2616]: (EE) Aug 28 13:36:55 mill /usr/lib/gdm3/gdm-x-session[2616]: Fatal server error: Aug 28 13:36:55 mill /usr/lib/gdm3/gdm-x-session[2616]: (EE) Caught signal 11 (Segmentation fault). Server aborting Aug 28 13:36:55 mill /usr/lib/gdm3/gdm-x-session[2616]: (EE) Aug 28 13:36:55 mill /usr/lib/gdm3/gdm-x-session[2616]: (EE) Aug 28 13:36:55 mill /usr/lib/gdm3/gdm-x-session[2616]: Please consult the The X.Org Foundation support Aug 28 13:36:55 mill /usr/lib/gdm3/gdm-x-session[2616]: #011 at http://wiki.x.org Aug 28 13:36:55 mill /usr/lib/gdm3/gdm-x-session[2616]:  for help. Aug 28 13:36:55 mill /usr/lib/gdm3/gdm-x-session[2616]: (EE) Please also check the log file at "/home/nigel/.local/share/xorg/Xorg.0.log" for additional information. Aug 28 13:36:55 mill /usr/lib/gdm3/gdm-x-session[2616]: (EE) Aug 28 13:36:55 mill /usr/lib/gdm3/gdm-x-session[2616]: (II) AIGLX: Suspending AIGLX clients for VT switch Aug 28 13:36:55 mill /usr/lib/gdm3/gdm-x-session[2616]: (EE) Server terminated with error (1). Closing log file. Aug 28 13:36:56 mill systemd[1]: Starting Process error reports when automatic reporting is enabled... Aug 28 13:37:01 mill nautilus[3334]: nautilus: Fatal IO error 11 (Resource temporarily unavailable) on X server :0. Aug 28 13:37:01 mill keepassxc[8945]: keepassxc: Fatal IO error 11 (Resource temporarily unavailable) on X server :0. Aug 28 13:37:01 mill org.gnome.Shell.desktop[2750]: Gdk-Message: 13:37:01.648: /usr/lib/firefox/firefox: Fatal IO error 11 (Resource temporarily unavailable) on X server :0.  ... a lot of other apps croaking similarly ...  Aug 28 13:37:01 mill gnome-session-binary[2628]: WARNING: App 'org.gnome.SettingsDaemon.Wacom.desktop' exited with code 1 Aug 28 13:37:01 mill gnome-session[2628]: gnome-session-binary[2628]: WARNING: App 'org.gnome.SettingsDaemon.Wacom.desktop' exited with code 1 Aug 28 13:37:01 mill gnome-session-binary[2628]: WARNING: App 'org.gnome.SettingsDaemon.Color.desktop' exited with code 1 Aug 28 13:37:01 mill gnome-session[2628]: gnome-session-binary[2628]: WARNING: App 'org.gnome.SettingsDaemon.Color.desktop' exited with code 1 Aug 28 13:37:01 mill gnome-session[2628]: gnome-session-binary[2628]: WARNING: App 'org.gnome.SettingsDaemon.MediaKeys.desktop' exited with code 1 Aug 28 13:37:01 mill gnome-session[2628]: gnome-session-binary[2628]: WARNING: App 'org.gnome.SettingsDaemon.Keyboard.desktop' exited with code 1 Aug 28 13:37:01 mill gnome-session-binary[2628]: WARNING: App 'org.gnome.SettingsDaemon.MediaKeys.desktop' exited with code 1 Aug 28 13:37:01 mill gnome-session-binary[2628]: WARNING: App 'org.gnome.SettingsDaemon.Keyboard.desktop' exited with code 1 Aug 28 13:37:01 mill rtkit-daemon[1488]: Supervising 1 threads of 1 processes of 1 users. Aug 28 13:37:01 mill rtkit-daemon[1488]: Successfully made thread 10328 of process 10312 (n/a) owned by '1000' RT at priority 5. Aug 28 13:37:01 mill rtkit-daemon[1488]: Supervising 2 threads of 1 processes of 1 users. Aug 28 13:37:01 mill rtkit-daemon[1488]: Supervising 2 threads of 1 processes of 1 users. Aug 28 13:37:01 mill rtkit-daemon[1488]: Successfully made thread 10329 of process 10312 (n/a) owned by '1000' RT at priority 5. Aug 28 13:37:01 mill rtkit-daemon[1488]: Supervising 3 threads of 1 processes of 1 users. Aug 28 13:37:01 mill dbus-daemon[971]: [system] Activating via systemd: service name='org.bluez' unit='dbus-org.bluez.service' requested by ':1.138' (uid=1000 pid=10312 comm="/usr/bin/pulseaudio --start --log-target=syslog " label="unconfined") Aug 28 13:37:01 mill at-spi-bus-launcher[2725]: XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":0" Aug 28 13:37:01 mill at-spi-bus-launcher[2725]:       after 2981 requests (2981 known processed) with 0 events remaining. Aug 28 13:37:01 mill gnome-shell[2750]: gnome-shell: Fatal IO error 4 (Interrupted system call) on X server :0. Aug 28 13:37:01 mill gsd-print-notif[2873]: Source ID 2 was not found when attempting to remove it Aug 28 13:37:01 mill kernel: [22074.902509] rfkill: input handler enabled Aug 28 13:37:01 mill systemd[2596]: Stopping D-Bus User Message Bus... Aug 28 13:37:01 mill gvfsd[2757]: A connection to the bus can't be made Aug 28 13:37:01 mill systemd[2596]: xdg-permission-store.service: Main process exited, code=exited, status=1/FAILURE Aug 28 13:37:01 mill systemd[2596]: xdg-permission-store.service: Failed with result 'exit-code'. Aug 28 13:37:01 mill deja-dup-monito[3966]: Owner of volume monitor org.gtk.vfs.UDisks2VolumeMonitor disconnected from the bus; removing drives/volumes/mounts Aug 28 13:37:01 mill deja-dup-monito[3966]: Owner of volume monitor org.gtk.vfs.MTPVolumeMonitor disconnected from the bus; removing drives/volumes/mounts Aug 28 13:37:01 mill deja-dup-monito[3966]: Owner of volume monitor org.gtk.vfs.GPhoto2VolumeMonitor disconnected from the bus; removing drives/volumes/mounts Aug 28 13:37:01 mill deja-dup-monito[3966]: Owner of volume monitor org.gtk.vfs.GoaVolumeMonitor disconnected from the bus; removing drives/volumes/mounts Aug 28 13:37:01 mill deja-dup-monito[3966]: Owner of volume monitor org.gtk.vfs.AfcVolumeMonitor disconnected from the bus; removing drives/volumes/mounts Aug 28 13:37:01 mill systemd[2596]: Stopped D-Bus User Message Bus. Aug 28 13:37:01 mill systemd[2596]: Started D-Bus User Message Bus. Aug 28 13:37:01 mill dbus-daemon[10362]: [session uid=1000 pid=10362] AppArmor D-Bus mediation is enabled Aug 28 13:37:03 mill systemd[1]: Started Session c5 of user gdm. 

There are no obvious customisations to look at and system memory is fine. Where to start with a solution?

## Touchpad randomly disabled upon reboot on lenovo x1c7

Just switched from apple to lenovo (carbon 7th gen), installed Ubuntu (19.04, with 5.0.0-25-generic). However, the touchpad randomly is disabled upon reboot (it is activated in the system settings). After rebooting the touchpanel sometimes starts to work, sometimes doesn’t. This happens only with the ubuntu partition, not with Windows. Can somebody help?