We introduce the geometric interpretation of the svd by using a toy example.

1 Iris dataset

The iris dataset is a dataset on iris flowers.

  • Three species (setosa, virginica and versicolor)
  • Length and width of Sepal leafs
  • Length and width of Petal Leafs

For didactical purposes we will use a subset of the data.

  • Virginica Species
  • 3 Variables: Sepal Length, Sepal Width, Petal Length
  • This allows us to visualise the data in 3D plots
  • Illustrate the data compression of the SVD from 3 to two dimensions.

1.1 Subset the data

library(tidyverse)
## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.1 ──
## ✔ ggplot2 3.3.5     ✔ purrr   0.3.4
## ✔ tibble  3.1.5     ✔ dplyr   1.0.7
## ✔ tidyr   1.1.4     ✔ stringr 1.4.0
## ✔ readr   2.0.1     ✔ forcats 0.5.1
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag()    masks stats::lag()
library(plotly)
## 
## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2':
## 
##     last_plot
## The following object is masked from 'package:stats':
## 
##     filter
## The following object is masked from 'package:graphics':
## 
##     layout
irisSub <- iris %>%
  filter(Species == "virginica") %>%
  dplyr::select("Sepal.Length","Sepal.Width","Petal.Length")

1.2 Center the data

X <- irisSub %>% scale(scale=FALSE)

The data is translated to a mean of [0, 0, 0].

We zoom in and add the original axis in grey in the origin.

2 SVD

  1. We adopt the SVD on the centered data
irisSvd <- svd(X)
  1. We extract
  • the right singular vectors \(\mathbf{V}\) and
  • the projections \(\mathbf{Z}\)
V <- irisSvd$v
Z <- irisSvd$u %*% diag(irisSvd$d)

Note, that

  • the SVD is essentially a rotation to a new coordinate system.
  • we plotted \(\mathbf{V}_3\) with dots because we will use the SVD for dimension reduction \[\text{3D} \rightarrow \text{2D}\]

Rotate the plot

  • Note, that

    • V1 points in the direction of the largest variability in the data
    • V2 points in a direction orthogal on V1 pointing in the direction of the second largest variability in the data.

3 Geometric Interpretation?

Write the truncated SVD as \[ \mathbf{X}_k = \mathbf{U}_k \boldsymbol{\Delta}_k \mathbf{V}_k^T = \mathbf{Z}_k \mathbf{V}_k^T \] with \[ \mathbf{Z}_k = \mathbf{U}_k \boldsymbol{\Delta}_k \] an \(n \times k\) matrix.

Each of the \(n\) rows of \(\mathbf{Z}_k\), say \(\mathbf{z}^T_{k,i}\), represents a point in a \(k\)-dimensional space.

V2 <- V[,1:2]
Z2 <- Z[,1:2]
X2 <- Z2 %*% t(V2)

Because of the orthonormality of the singular vectors, we also have \[\begin{eqnarray*} \mathbf{X}_k\mathbf{V}_k &=& \mathbf{Z}_k \mathbf{V}_k^T\mathbf{V}_k \\ \mathbf{X}_k\mathbf{V}_k &=& \mathbf{Z}_k. \end{eqnarray*}\]

Thus the matrix \(\mathbf{V}_k\) is a transformation matrix that may be used to transform \(\mathbf{X}_k\) into \(\mathbf{Z}_k\), and \(\mathbf{Z}_k\) into \(\mathbf{X}_k\).


More importantly, it can be shown that (thanks to orthonormality of \(\mathbf{V}\)) \[ \mathbf{X}\mathbf{V}_k = \mathbf{Z}_k. \]

This follows from (w.l.g. rank(\(\mathbf{X}\))=\(r\)) \[\begin{eqnarray*} \mathbf{X}\mathbf{V}_k &=& \mathbf{UDV}^T\mathbf{V}_k = \mathbf{UD}\begin{pmatrix} \mathbf{v}_1^T \\ \vdots \\ \mathbf{v}_r^T \end{pmatrix} \begin{pmatrix} \mathbf{v}_1 \ldots \mathbf{v}_k \end{pmatrix} \\ &=& \mathbf{UDV}^T\mathbf{V}_k = \mathbf{UD}\begin{pmatrix} 1 & 0 & \ldots & 0 \\ 0 & 1 & \ldots & 0 \\ \vdots & \vdots & \ddots & 0 \\ 0 & 0 & \ldots & 1 \\ 0 & 0 & \ldots & 0 \\ \vdots & \vdots & \vdots & \vdots \\ 0 & 0 & \ldots & 0 \end{pmatrix} \ = \mathbf{U}_k\boldsymbol{\Delta}_k = \mathbf{Z}_k \end{eqnarray*}\]

The \(p \times k\) matrix \(\mathbf{V}_k\) acts as a transformation matrix: transforming \(n\) points in a \(p\) dimensional space to \(n\) points in a \(k\) dimensional space.

Z2proj <- X %*% V2
range(Z2 - Z2proj)
## [1] -8.881784e-16  1.082467e-15

3.1 Projection of a single data point

  • Zoom in to see projection.
  • The projection is indicated for the blue point \(X_{44}\) to the red point \(X_{2,44}\) in the plane spaned by V2.

3.2 Projection of all datapoints: project all rows of X on V2

  • Zoom in first look orthonal via direction V2 (rotate until text V2 is viewed in the origin)
  • Zoom in first look orthonal via direction V1 (rotate until text V1 is viewed in the origin)
  • Note, that
    • V1 points in the direction of the largest variability in the data
    • V2 points in a direction orthogal on V1 pointing in the direction of the second largest variability in the data.
  • Projection only.
  • This clearly shows that the projected points X2 (X projected on V2) live in a two dimensional space
LS0tCnRpdGxlOiAiMi4zLiBTaW5ndWxhciBWYWx1ZSBEZWNvbXBvc2l0aW9uIC0gR2VvbWV0cmljIGludGVycHJldGF0aW9uIgphdXRob3I6ICJMaWV2ZW4gQ2xlbWVudCIKZGF0ZTogInN0YXRPbWljcywgR2hlbnQgVW5pdmVyc2l0eSAoaHR0cHM6Ly9zdGF0b21pY3MuZ2l0aHViLmlvKSIKYWx3YXlzX2FsbG93X2h0bWw6IHRydWUKLS0tCgo8aWZyYW1lIHdpZHRoPSI1NjAiIGhlaWdodD0iMzE1IiBzcmM9Imh0dHBzOi8vd3d3LnlvdXR1YmUuY29tL2VtYmVkL3NyVURCd1A5SVc4CiIgZnJhbWVib3JkZXI9IjAiIHN0eWxlPSJkaXNwbGF5OiBibG9jazsgbWFyZ2luOiBhdXRvOyIgYWxsb3c9ImF1dG9wbGF5OyBlbmNyeXB0ZWQtbWVkaWEiIGFsbG93ZnVsbHNjcmVlbj48L2lmcmFtZT4KCldlIGludHJvZHVjZSB0aGUgZ2VvbWV0cmljIGludGVycHJldGF0aW9uIG9mIHRoZSBzdmQgYnkgdXNpbmcgYSB0b3kgZXhhbXBsZS4KCiMgSXJpcyBkYXRhc2V0CgpUaGUgaXJpcyBkYXRhc2V0IGlzIGEgZGF0YXNldCBvbiB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ksCiAgICB0eXBlPSJzY2F0dGVyM2QiKSAlPiUKICBhZGRfdHJhY2UoCiAgICB4ID0gYygwLCBWWzEsMl0pLAogICAgeSA9IGMoMCwgVlsyLDJdKSwKICAgIHogPSBjKDAsIFZbMywyXSksCiAgICBtb2RlID0gImxpbmVzIiwKICAgIGxpbmUgPSBsaXN0KHdpZHRoID0gNSwgY29sb3IgPSAicmVkIiksCiAgICB0eXBlID0gInNjYXR0ZXIzZCIpICU+JQogIGFkZF90cmFjZSgKICAgIHggPSBjKDAsIFZbMSwzXSksCiAgICB5ID0gYygwLCBWWzIsM10pLAogICAgeiA9IGMoMCwgVlszLDNdKSwKICAgIG1vZGUgPSAibGluZXMiLAogICAgbGluZSA9IGxpc3QoCiAgICAgIHdpZHRoID0gNSwKICAgICAgY29sb3IgPSAicmVkIiwKICAgICAgZGFzaCA9ICJkYXNoIiksCiAgICB0eXBlPSJzY2F0dGVyM2QiKSAlPiUKICAgIGhpZGVfbGVnZW5kKCkgJT4lCiAgICBsYXlvdXQoCiAgICAgIHNjZW5lID0gbGlzdCgKICAgICAgICBhc3BlY3Rtb2RlPSJjdWJlIiwKICAgICAgICBhbm5vdGF0aW9ucyA9IGxpc3QoCiAgICAgICAgICBsaXN0KAogICAgICAgICAgICB4ID0gVlsxLDFdLAogICAgICAgICAgICB5ID0gVlsyLDFdLAogICAgICAgICAgICB6ID0gVlszLDFdLAogICAgICAgICAgICB0ZXh0ID0gIlYxIiwKICAgICAgICAgICAgdGV4dGFuZ2xlPSAwLAogICAgICAgICAgICBheCA9IDAsCiAgICAgICAgICAgIGF5ID0gMCwKICAgICAgICAgICAgYXogPSAwLAogICAgICAgICAgICB4cmVmPSd4JywKICAgICAgICAgICAgYXhyZWY9J3gnLAogICAgICAgICAgICB5cmVmID0gJ3knLAogICAgICAgICAgICBheXJlZiA9ICd5JywKICAgICAgICAgICAgenJlZiA9ICd6JywKICAgICAgICAgICAgYXpyZWY9J3onLAogICAgICAgICAgICBzaG93YXJyb3c9RkFMU0UKICAgICAgICAgICAgKSwKICAgICAgICAgIGxpc3QoCiAgICAgICAgICAgIHggPSBWWzEsMl0sCiAgICAgICAgICAgIHkgPSBWWzIsMl0sCiAgICAgICAgICAgIHogPSBWWzMsMl0sCiAgICAgICAgICAgIHRleHQgPSAiVjIiLAogICAgICAgICAgICB0ZXh0YW5nbGU9IDAsCiAgICAgICAgICAgIGF4ID0gMCwKICAgICAgICAgICAgYXkgPSAwLAogICAgICAgICAgICBheiA9IDAsCiAgICAgICAgICAgIHhyZWY9J3gnLAogICAgICAgICAgICBheHJlZj0neCcsCiAgICAgICAgICAgIHlyZWYgPSAneScsCiAgICAgICAgICAgIGF5cmVmID0gJ3knLAogICAgICAgICAgICB6cmVmID0gJ3onLAogICAgICAgICAgICBhenJlZj0neicsCiAgICAgICAgICAgIHNob3dhcnJvdz1GQUxTRQogICAgICAgICAgICApLAogICAgICAgICAgbGlzdCgKICAgICAgICAgICAgeCA9IFZbMSwzXSwKICAgICAgICAgICAgeSA9IFZbMiwzXSwKICAgICAgICAgICAgeiA9IFZbMywzXSwKICAgICAgICAgICAgdGV4dCA9ICJWMyIsCiAgICAgICAgICAgIHRleHRhbmdsZT0gMCwKICAgICAgICAgICAgYXggPSAwLAogICAgICAgICAgICBheSA9IDAsCiAgICAgICAgICAgIGF6ID0gMCwKICAgICAgICAgICAgeHJlZj0neCcsCiAgICAgICAgICAgIGF4cmVmPSd4JywKICAgICAgICAgICAgeXJlZiA9ICd5JywKICAgICAgICAgICAgYXlyZWYgPSAneScsCiAgICAgICAgICAgIHpyZWYgPSAneicsCiAgICAgICAgICAgIGF6cmVmPSd6JywKICAgICAgICAgICAgc2hvd2Fycm93PUZBTFNFKQogICAgICAgICAgKQogICAgICAgICkKICAgICAgKQpwNApwNCA8LSBwNCAlPiUKICBhZGRfbWFya2VycygKICAgIHR5cGUgPSAic2NhdHRlcjNkIiwKICAgIHR5cGUgPSAibWFya2VycyIsCiAgICBtYXJrZXIgPSBsaXN0KGNvb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ICAgeiA9IGMoMCwgVlszLDJdKSwKICAgICAgbW9kZSA9ICJsaW5lcyIsCiAgICAgIGxpbmUgPSBsaXN0KAogICAgICAgIHdpZHRoID0gNSwKICAgICAgICBjb2xvciA9ICJyZWQiKSwKICAgICAgdHlwZT0ic2NhdHRlcjNkIikgJT4lCiAgICBhZGRfdHJhY2UoCiAgICAgIHggPSBjKDAsIFZbMSwgM10pLAogICAgICB5ID0gYygwLCBWWzIsIDNdKSwKICAgICAgeiA9IGMoMCwgVlszLCAzXSksCiAgICAgIG1vZGUgPSAibGluZXMiLAogICAgICBsaW5lID0gbGlzdCgKICAgICAgICB3aWR0aCA9IDUsCiAgICAgICAgY29sb3IgPSAicmVkIiwKICAgICAgICBkYXNoID0gImRhc2giKSwKICAgICAgICB0eXBlPSJzY2F0dGVyM2QiKSAlPiUKICAgIGhpZGVfbGVnZW5kKCkgJT4lCiAgICBsYXlvdXQoCiAgICAgIHNjZW5lID0gbGlzdCgKICAgICAgICBhc3BlY3Rtb2RlPSJjdWJlIiwKICAgICAgICBhbm5vdGF0aW9ucyA9IGxpc3QobGlzdCgKICAgICAgICAgIHggPSBWWzEsMV0sCiAgICAgICAgICB5ID0gVlsyLDFdLAogICAgICAgICAgeiA9IFZbMywxXSwKICAgICAgICAgIHRleHQgPSAiVjEiLAogICAgICAgICAgdGV4dGFuZ2xlPSAwLAogICAgICAgICAgYXggPSAwLAogICAgICAgICAgYXkgPSAwLAogICAgICAgICAgYXogPSAwLAogICAgICAgICAgeHJlZiA9ICd4JywKICAgICAgICAgIGF4cmVmID0gJ3gnLAogICAgICAgICAgeXJlZiA9ICd5JywKICAgICAgICAgIGF5cmVmID0gJ3knLAogICAgICAgICAgenJlZiA9ICd6JywKICAgICAgICAgIGF6cmVmPSd6JywKICAgICAgICAgIHNob3dhcnJvdz1GQUxTRQogICAgICAgICAgKSwKICAgICAgICBsaXN0KAogICAgICAgICAgeCA9IFZbMSwyXSwKICAgICAgICAgIHkgPSBWWzIsMl0sCiAgICAgICAgICB6ID0gVlszLDJdLAogICAgICAgICAgdGV4dCA9ICJWMiIsCiAgICAgICAgICB0ZXh0YW5nbGU9IDAsCiAgICAgICAgICBheCA9IDAsCiAgICAgICAgICBheSA9IDAsCiAgICAgICAgICBheiA9IDAsCiAgICAgICAgICB4cmVmID0gJ3gnLAogICAgICAgICAgYXhyZWYgPSAneCcsCiAgICAgICAgICB5cmVmID0gJ3knLAogICAgICAgICAgYXlyZWYgPSAneScsCiAgICAgICAgICB6cmVmID0gJ3onLAogICAgICAgICAgYXpyZWY9J3onLAogICAgICAgICAgc2hvd2Fycm93PUZBTFNFCiAgICAgICAgICApLAogICAgICAgIGxpc3QoCiAgICAgICAgICB4ID0gVlsxLDNdLAogICAgICAgICAgeSA9IFZbMiwzXSwKICAgICAgICAgIHogPSBWWzMsM10sCiAgICAgICAgICB0ZXh0ID0gIlYzIiwKICAgICAgICAgIHRleHRhbmdsZT0gMCwKICAgICAgICAgIGF4ID0gMCwKICAgICAgICAgIGF5ID0gMCwKICAgICAgICAgIGF6ID0gMCwKICAgICAgICAgIHhyZWYgPSAneCcsCiAgICAgICAgICBheHJlZiA9ICd4JywKICAgICAgICAgIHlyZWYgPSAneScsCiAgICAgICAgICBheXJlZiA9ICd5JywKICAgICAgICAgIHpyZWYgPSAneicsCiAgICAgICAgICBhenJlZj0neicsCiAgICAgICAgICBzaG93YXJyb3c9RkFMU0UKICAgICAgICAgICkKICAgICAgICApCiAgICAgICkKICAgICkgJT4lCiAgYWRkX21hcmtlcnModHlwZT0ic2NhdHRlcjNkIixtb2RlPSJtYXJrZXJzIixtYXJrZXI9bGlzdChjb2xvcj0iZ3JleSIpLGhvdmVyaW5mbz0ibm9uZSIpICU+JQphZGRfdHJhY2UoCiAgZGF0YSA9IChYJT4lYXMuZGF0YS5mcmFtZSlbaSxdLAogIHggPSB+U2VwYWwuTGVuZ3RoLAogIHkgPSB+U2VwYWwuV2lkdGgsCiAgeiA9IH5QZXRhbC5MZW5ndGgsCiAg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LCAxXSksCiAgICB5ID0gYygwLCBWWzIsIDFdKSwKICAgIHogPSBjKDAsIFZbMywgMV0pLAogICAgbW9kZSA9ICJsaW5lcyIsCiAgICBsaW5lID0gbGlzdCgKICAgICAgd2lkdGggPSA1LAogICAgICBjb2xvciA9ICJyZWQiKSwKICAgIHR5cGU9InNjYXR0ZXIzZCIpICU+JQogICAgYWRkX3RyYWNlKAogICAgICB4ID0gYygwLCBWWzEsIDJdKSwKICAgICAgeSA9IGMoMCwgVlsyLCAyXSksCiAgICAgIHogPSBjKDAsIFZbMywyXSksCiAgICAgIG1vZGUgPSAibGluZXMiLAogICAgICBsaW5lID0gbGlzdCgKICAgICAgICB3aWR0aCA9IDUsCiAgICAgICAgY29sb3IgPSAicmVkIiksCiAgICAgIHR5cGU9InNjYXR0ZXIzZCIpICU+JQogICAgYWRkX3RyYWNlKAogICAgICB4ID0gYygwLCBWWzEsIDNdKSwKICAgICAgeSA9IGMoMCwgVlsyLCAzXSksCiAgICAgIHogPSBjKDAsIFZbMywgM10pLAogICAgICBtb2RlID0gImxpbmVzIiwKICAgICAgbGluZSA9IGxpc3QoCiAgICAgICAgd2lkdGggPSA1LAogICAgICAgIGNvbG9yID0gInJlZCIsCiAgICAgICAgZGFzaCA9ICJkYXNoIiksCiAgICAgICAgdHlwZT0ic2NhdHRlcjNkIikgJT4lCiAgICBoaWRlX2xlZ2VuZCgpICU+JQogICAgbGF5b3V0KAogICAgICBzY2VuZSA9IGxpc3QoCiAgICAgICAgYXNwZWN0bW9kZT0iY3ViZSIsCiAgICAgICAgYW5ub3RhdGlvbnMgPSBsaXN0KGxpc3QoCiAgICAgICAgICB4ID0gVlsxLDFdLAogICAgICAgICAgeSA9IFZbMiwxXSwKICAgICAgICAgIHogPSBWWzMsMV0sCiAgICAgICAgICB0ZXh0ID0gIlYxIiwKICAgICAgICAgIHRleHRhbmdsZT0gMCwKICAgICAgICAgIGF4ID0gMCwKICAgICAgICAgIGF5ID0gMCwKICAgICAgICAgIGF6ID0gMCwKICAgICAgICAgIHhyZWYgPSAneCcsCiAgICAgICAgICBheHJlZiA9ICd4JywKICAgICAgICAgIHlyZWYgPSAneScsCiAgICAgICAgICBheXJlZiA9ICd5JywKICAgICAgICAgIHpyZWYgPSAneicsCiAgICAgICAgICBhenJlZj0neicsCiAgICAgICAgICBzaG93YXJyb3c9RkFMU0UKICAgICAgICAgICksCiAgICAgICAgbGlzdCgKICAgICAgICAgIHggPSBWWzEsMl0sCiAgICAgICAgICB5ID0gVlsyLDJdLAogICAgICAgICAgeiA9IFZbMywyXSwKICAgICAgICAgIHRleHQgPSAiVjIiLAogICAgICAgICAgdGV4dGFuZ2xlPSAwLAogICAgICAgICAgYXggPSAwLAogICAgICAgICAgYXkgPSAwLAogICAgICAgICAgYXogPSAwLAogICAgICAgICAgeHJlZiA9ICd4JywKICAgICAgICAgIGF4cmVmID0gJ3gnLAogICAgICAgICAgeXJlZiA9ICd5JywKICAgICAgICAgIGF5cmVmID0gJ3knLAogICAgICAgICAgenJlZiA9ICd6JywKICAgICAgICAgIGF6cmVmPSd6JywKICAgICAgICAgIHNob3dhcnJvdz1GQUxTRQogICAgICAgICAgKSwKICAgICAgICBsaXN0KAogICAgICAgICAgeCA9IFZbMSwzXSwKICAgICAgICAgIHkgPSBWWzIsM10sCiAgICAgICAgICB6ID0gVlszLDNdLAogICAgICAgICAgdGV4dCA9ICJWMyIsCiAgICAgICAgICB0ZXh0YW5nbGU9IDAsCiAgICAgICAgICBheCA9IDAsCiAgICAgICAgICBheSA9IDAsCiAgICAgICAgICBheiA9IDAsCiAgICAgICAgICB4cmVmID0gJ3gnLAogICAgICAgICAgYXhyZWYgPSAneCcsCiAgICAgICAgICB5cmVmID0gJ3knLAogICAgICAgICAgYXlyZWYgPSAneScsCiAgICAgICAgICB6cmVmID0gJ3onLAogICAgICAgICAgYXpyZWY9J3onLAogICAgICAgICAgc2hvd2Fycm93PUZBTFNFCiAgICAgICAgICApCiAgICAgICAgKQogICAgICApCiAgICApICU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iAgICB0eXBlID0gInNjYXR0ZXIzZCIsCiAgICBtb2RlID0gIm1hcmtlcnMiLAogICAgbWFya2VyID0gbGlzdChjb2xvcj0icmVkIikpICU+JQogIGFkZF90cmFjZSgKICAgIHggPSBjKDAsIDEpLAogICAgeSA9IGMoMCwgMCksCiAgICB6ID0gYygwLCAwKSwKICAgIG1vZGUgPSAibGluZXMiLAogICAgbGluZSA9IGxpc3QoCiAgICAgIHdpZHRoID0gNSwKICAgICAgY29sb3IgPSAiZ3JleSIsCiAgICAgIGRhc2ggPSAiZGFzaCIpLAogICAgdHlwZT0ic2NhdHRlcjNkIikgJT4lCiAgYWRkX3RyYWNlKAogICAgeCA9IGMoMCwgMCksCiAgICB5ID0gYygwLCAxKSwKICAgIHogPSBjKDAsIDApLAogICAgbW9kZSA9ICJsaW5lcyIsCiAgICBsaW5lID0gbGlzdCgKICAgICAgd2lkdGggPSA1LAogICAgICBjb2xvciA9ICJncmV5IiwKICAgICAgZGFzaCA9ICJkYXNoIiksCiAgICB0eXBlPSJzY2F0dGVyM2QiKSAlPiUKICBhZGRfdHJhY2UoCiAgICB4ID0gYygwLCAwKSwKICAgIHkgPSBjKDAsIDApLAogICAgeiA9IGMoMCwgMSksCiAgICBtb2RlID0gImxpbmVzIiwKICAgIGxpbmUgPSBsaXN0KAogICAgICB3aWR0aCA9IDUsCiAgICAgIGNvbG9yID0gImdyZXkiLAogICAgICBkYXNoID0gImRhc2giKSwKICAgIHR5cGU9InNjYXR0ZXIzZCIpICU+JQogIGFkZF90cmFjZSgKICAgIHggPSBjKDAsIFZbMSwgMV0pLAogICAgeSA9IGMoMCwgVlsyLCAxXSksCiAgICB6ID0gYygwLCBWWzMsIDFdKSwKICAgIG1vZGUgPSAibGluZXMiLAogICAgbGluZSA9IGxpc3QoCiAgICAgIHdpZHRoID0gNSwKICAgICAgY29sb3IgPSAicmVkIiksCiAgICB0eXBlPSJzY2F0dGVyM2QiKSAlPiUKICBhZGRfdHJhY2UoCiAgICB4ID0gYygwLCBWWzEsIDJdKSwKICAgIHkgPSBjKDAsIFZbMiwgMl0pLAogICAgeiA9IGMoMCwgVlszLCAyXSksCiAgICBtb2RlID0gImxpbmVzIiwKICAgIGxpbmUgPSBsaXN0KAogICAgICB3aWR0aCA9IDUsCiAgICAgIGNvbG9yID0gInJlZCIpLAogICAgdHlwZT0ic2NhdHRlcjNkIikgJT4lCiAgaGlkZV9sZWdlbmQoKSAlPiUKICBsYXlvdXQoCiAgICBzY2VuZSA9IGxpc3QoCiAgICAgIGFzcGVjdG1vZGU9ImN1YmUiLAogICAgICBhbm5vdGF0aW9ucyA9IGxpc3QobGlzdCgKICAgICAgICB4ID0gVlsxLDFdLAogICAgICAgIHkgPSBWWzIsMV0sCiAgICAgICAgeiA9IFZbMywxXSwKICAgICAgICB0ZXh0ID0gIlYxIiwKICAgICAgICB0ZXh0YW5nbGU9IDAsCiAgICAgICAgYXggPSAwLAogICAgICAgIGF5ID0gMCwKICAgICAgICBheiA9IDAsCiAgICAgICAgeHJlZiA9ICd4JywKICAgICAgICBheHJlZiA9ICd4JywKICAgICAgICB5cmVmID0gJ3knLAogICAgICAgIGF5cmVmID0gJ3knLAogICAgICAgIHpyZWYgPSAneicsCiAgICAgICAgYXpyZWY9J3onLAogICAgICAgIHNob3dhcnJvdz1GQUxTRQogICAgICApLAogICAgICBsaXN0KAogICAgICAgIHggPSBWWzEsMl0sCiAgICAgICAgeSA9IFZbMiwyXSwKICAgICAgICB6ID0gVlszLDJdLAogICAgICAgIHRleHQgPSAiVjIiLAogICAgICAgIHRleHRhbmdsZSA9IDAsCiAgICAgICAgYXggPSAwLAogICAgICAgIGF5ID0gMCwKICAgICAgICBheiA9IDAsCiAgICAgICAgeHJlZiA9ICd4JywKICAgICAgICBheHJlZiA9ICd4JywKICAgICAgICB5cmVmID0gJ3knLAogICAgICAgIGF5cmVmID0gJ3knLAogICAgICAgIHpyZWYgPSAneicsCiAgICAgICAgYXpyZWY9J3onLAogICAgICAgIHNob3dhcnJvdz1GQUxTRQogICAgICAgICkKICAgICAgKQogICAgKQogICkgJT4lCiAgbGF5b3V0KAogICAgc2NlbmUgPSBsaXN0KAogICAgICBhc3BlY3Rtb2RlID0gImN1YmUiLAogICAgICB4YXhpcyA9IGxpc3QocmFuZ2UgPSBjKC0xLCAxKSAqIG1heChhYnMoWCkpKSwgeWF4aXMgPSBsaXN0KHJhbmdlPWMoLTEsIDEpICogbWF4KGFicyhYKSkpLAogICAgICB6YXhpcyA9IGxpc3QocmFuZ2U9YygtMSwgMSkqbWF4KGFicyhYKSkpKQogICAgICApCnA5CmBgYAo=