diff options
Diffstat (limited to '')
-rwxr-xr-x | skripti/mgl_obvesti_ob_dogodku.py | 20 | ||||
-rwxr-xr-x | skripti/mgl_obvesti_ob_dogodku.sh | 20 | ||||
-rw-r--r-- | šola/ana1/kolokvij2.lyx | 689 | ||||
-rw-r--r-- | šola/la/kolokvij2.lyx | 1101 | ||||
-rw-r--r-- | šola/p1/dn/DN11_63230317.java | 146 |
5 files changed, 1976 insertions, 0 deletions
diff --git a/skripti/mgl_obvesti_ob_dogodku.py b/skripti/mgl_obvesti_ob_dogodku.py new file mode 100755 index 0000000..47d63c6 --- /dev/null +++ b/skripti/mgl_obvesti_ob_dogodku.py @@ -0,0 +1,20 @@ +#!/usr/bin/python3 +import feedparser ### NOTE: TOLE JE BROKEN SKRIPT, KER KULTURNIK NE KAŽE VSEH DOGODKOV!!!!!!!! +import sys +import datetime +import time +import smtplib +already = [] +while True: + for event in feedparser.parse("https://dogodki.ljudmila.net/?what=gledalisce&where=MGL%20-%20Mestno%20gledali%C5%A1%C4%8De%20ljubljansko&format=rss")["entries"]: + if event["title"] != sys.argv[1]: + continue + if datetime.datetime.fromisoformat(event["ical_dtstart"].split("+")[0]) > datetime.datetime.fromisoformat(sys.argv[2]): + if event["ical_dtstart"] in already: + continue + already.append(event["ical_dtstart"]) + server = smtplib.SMTP("localhost", 25) + server.ehlo() + server.sendmail("r-skripti-mgl@sijanec.eu", "anton@sijanec.eu", f"Subject: mgl razpisana predstava\r\n\r\n{sys.argv[1]} {event['ical_dtstart']}") + server.close() + time.sleep(60) diff --git a/skripti/mgl_obvesti_ob_dogodku.sh b/skripti/mgl_obvesti_ob_dogodku.sh new file mode 100755 index 0000000..3714513 --- /dev/null +++ b/skripti/mgl_obvesti_ob_dogodku.sh @@ -0,0 +1,20 @@ +#!/bin/bash +set -xeuo pipefail +olds="" +while : +do + news=`curl -H "User-Agent: $0 kontakt anton@sijanec.eu" "https://www.mgl.si/sl/spored/?location=1&event=1072&subs=" | grep "big-date" | cut -d\> -f2 | cut -d\< -f1` + if [ "$news" = "$olds" ] + then + continue + fi +sendmail anton@sijanec.eu <<EOF +From: projects-r-skripti-mgl.sh@sijanec.eu +To: anton@sijanec.eu +Subject: novi datumi iskane predstave v mgl + +datumi so: $news +EOF + olds=$news + sleep 60 +done diff --git a/šola/ana1/kolokvij2.lyx b/šola/ana1/kolokvij2.lyx new file mode 100644 index 0000000..486a401 --- /dev/null +++ b/šola/ana1/kolokvij2.lyx @@ -0,0 +1,689 @@ +#LyX 2.3 created this file. For more info see http://www.lyx.org/ +\lyxformat 544 +\begin_document +\begin_header +\save_transient_properties true +\origin unavailable +\textclass article +\begin_preamble +\usepackage{siunitx} +\usepackage{pgfplots} +\usepackage{listings} +\usepackage{multicol} +\sisetup{output-decimal-marker = {,}, quotient-mode=fraction, output-exponent-marker=\ensuremath{\mathrm{3}}} +\end_preamble +\use_default_options true +\begin_modules +enumitem +theorems-ams +\end_modules +\maintain_unincluded_children false +\language slovene +\language_package default +\inputencoding auto +\fontencoding global +\font_roman "default" "default" +\font_sans "default" "default" +\font_typewriter "default" "default" +\font_math "auto" "auto" +\font_default_family default +\use_non_tex_fonts false +\font_sc false +\font_osf false +\font_sf_scale 100 100 +\font_tt_scale 100 100 +\use_microtype false +\use_dash_ligatures true +\graphics default +\default_output_format default +\output_sync 0 +\bibtex_command default +\index_command default +\paperfontsize default +\spacing single +\use_hyperref false +\papersize default +\use_geometry true +\use_package amsmath 1 +\use_package amssymb 1 +\use_package cancel 1 +\use_package esint 1 +\use_package mathdots 1 +\use_package mathtools 1 +\use_package mhchem 1 +\use_package stackrel 1 +\use_package stmaryrd 1 +\use_package undertilde 1 +\cite_engine basic +\cite_engine_type default +\biblio_style plain +\use_bibtopic false +\use_indices false +\paperorientation portrait +\suppress_date false +\justification false +\use_refstyle 1 +\use_minted 0 +\index Index +\shortcut idx +\color #008000 +\end_index +\leftmargin 1cm +\topmargin 1cm +\rightmargin 1cm +\bottommargin 2cm +\headheight 1cm +\headsep 1cm +\footskip 1cm +\secnumdepth 3 +\tocdepth 3 +\paragraph_separation indent +\paragraph_indentation default +\is_math_indent 0 +\math_numbering_side default +\quotes_style german +\dynamic_quotes 0 +\papercolumns 1 +\papersides 1 +\paperpagestyle default +\tracking_changes false +\output_changes false +\html_math_output 0 +\html_css_as_file 0 +\html_be_strict false +\end_header + +\begin_body + +\begin_layout Title +List s formulami za 2. + kolokvij Analize 1 +\end_layout + +\begin_layout Author + +\noun on +Anton Luka Šijanec +\end_layout + +\begin_layout Date +\begin_inset ERT +status open + +\begin_layout Plain Layout + + +\backslash +today +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard +\begin_inset ERT +status open + +\begin_layout Plain Layout + + +\backslash +newcommand +\backslash +euler{e} +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard +\begin_inset ERT +status open + +\begin_layout Plain Layout + + +\backslash +setlength{ +\backslash +columnseprule}{0.2pt} +\backslash +begin{multicols}{2} +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard +\begin_inset Tabular +<lyxtabular version="3" rows="8" columns="4"> +<features tabularvalignment="middle"> +<column alignment="center" valignment="top"> +<column alignment="center" valignment="top"> +<column alignment="center" valignment="top"> +<column alignment="center" valignment="top"> +<row> +<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none"> +\begin_inset Text + +\begin_layout Plain Layout +Izraz +\end_layout + +\end_inset +</cell> +<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none"> +\begin_inset Text + +\begin_layout Plain Layout +Odvod +\end_layout + +\end_inset +</cell> +<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none"> +\begin_inset Text + +\begin_layout Plain Layout +Izraz +\end_layout + +\end_inset +</cell> +<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none"> +\begin_inset Text + +\begin_layout Plain Layout +Odvod +\end_layout + +\end_inset +</cell> +</row> +<row> +<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset Formula $\frac{f}{g}$ +\end_inset + + +\end_layout + +\end_inset +</cell> +<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset Formula $\frac{f'g-fg'}{g^{2}}$ +\end_inset + +, +\begin_inset Formula $g\not=0$ +\end_inset + + +\end_layout + +\end_inset +</cell> +<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset Formula $f\left(g\right)$ +\end_inset + + +\end_layout + +\end_inset +</cell> +<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none"> +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset Formula $f'\left(g\right)g'$ +\end_inset + + +\end_layout + +\end_inset +</cell> +</row> +<row> +<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset Formula $\tan x$ +\end_inset + + +\end_layout + +\end_inset +</cell> +<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset Formula $\cos^{-2}x$ +\end_inset + + +\end_layout + +\end_inset +</cell> +<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset Formula $\cot x$ +\end_inset + + +\end_layout + +\end_inset +</cell> +<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none"> +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset Formula $-sin^{-2}x$ +\end_inset + + +\end_layout + +\end_inset +</cell> +</row> +<row> +<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset Formula $a^{x}$ +\end_inset + + +\end_layout + +\end_inset +</cell> +<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset Formula $a^{x}\text{\ensuremath{\ln a}}$ +\end_inset + + +\end_layout + +\end_inset +</cell> +<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset Formula $x^{x}$ +\end_inset + + +\end_layout + +\end_inset +</cell> +<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none"> +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset Formula $x^{x}\left(1+\ln x\right)$ +\end_inset + + +\end_layout + +\end_inset +</cell> +</row> +<row> +<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset Formula $log_{a}x$ +\end_inset + + +\end_layout + +\end_inset +</cell> +<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset Formula $\frac{1}{x\ln a}$ +\end_inset + + +\end_layout + +\end_inset +</cell> +<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset Formula $f^{-1}\left(a\right)$ +\end_inset + + +\end_layout + +\end_inset +</cell> +<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none"> +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset Formula $\frac{1}{f'\left(f^{-1}\left(a\right)\right)}$ +\end_inset + + +\end_layout + +\end_inset +</cell> +</row> +<row> +<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset Formula $\arcsin x$ +\end_inset + + +\end_layout + +\end_inset +</cell> +<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset Formula $\left(1-x^{2}\right)^{-\frac{1}{2}}$ +\end_inset + + +\end_layout + +\end_inset +</cell> +<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset Formula $\arccos x$ +\end_inset + + +\end_layout + +\end_inset +</cell> +<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none"> +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset Formula $-\left(1-x^{2}\right)^{-\frac{1}{2}}$ +\end_inset + + +\end_layout + +\end_inset +</cell> +</row> +<row> +<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset Formula $\arctan x$ +\end_inset + + +\end_layout + +\end_inset +</cell> +<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset Formula $\frac{1}{1+x^{2}}$ +\end_inset + + +\end_layout + +\end_inset +</cell> +<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset Formula $\text{arccot\,}x$ +\end_inset + + +\end_layout + +\end_inset +</cell> +<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none"> +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset Formula $-\frac{1}{1+x^{2}}$ +\end_inset + + +\end_layout + +\end_inset +</cell> +</row> +<row> +<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none"> +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset Formula $x^{n}$ +\end_inset + + +\end_layout + +\end_inset +</cell> +<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none"> +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset Formula $nx^{n-1}$ +\end_inset + + +\end_layout + +\end_inset +</cell> +<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none"> +\begin_inset Text + +\begin_layout Plain Layout + +\end_layout + +\end_inset +</cell> +<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none"> +\begin_inset Text + +\begin_layout Plain Layout + +\end_layout + +\end_inset +</cell> +</row> +</lyxtabular> + +\end_inset + + +\end_layout + +\begin_layout Itemize +\begin_inset Formula $f''\left(I\right)>0\Leftrightarrow f$ +\end_inset + + konveksna na +\begin_inset Formula $I$ +\end_inset + + +\end_layout + +\begin_layout Itemize +\begin_inset Formula $f''\left(I\right)<0\Leftrightarrow f$ +\end_inset + + konkavna na +\begin_inset Formula $I$ +\end_inset + + +\begin_inset Formula +\[ +ab>0\wedge a<b\Leftrightarrow a^{-1}>b^{-1},\quad ab<0\wedge a<b\Leftrightarrow a^{-1}<b^{-1} +\] + +\end_inset + + +\end_layout + +\begin_layout Standard +\begin_inset Formula +\[ +\lim_{x\to0}\frac{\sin x}{x}=1\quad\quad\tan\phi=\left|\frac{k_{1}-k_{2}}{1+k_{1}k_{2}}\right| +\] + +\end_inset + + +\end_layout + +\begin_layout Standard +\begin_inset Formula +\[ +\lim_{x\to0}x\ln x=0 +\] + +\end_inset + + +\end_layout + +\begin_layout Standard +\begin_inset Formula +\[ +f\text{ zv.+odv.@ }\left[a,b\right]\Rightarrow\exists\xi\in\left[a,b\right]\ni:f\left(b\right)-f\left(a\right)=f'\left(\xi\right)\left(b-a\right) +\] + +\end_inset + + +\end_layout + +\begin_layout Standard +\begin_inset Formula +\[ +T_{f,a,n}\left(x\right)=\sum_{k=0}^{n}\frac{f^{\left(k\right)}\left(a\right)}{k!}\left(x-a\right)^{k} +\] + +\end_inset + + +\end_layout + +\begin_layout Standard +\begin_inset Formula $f\text{\ensuremath{\in C^{n+1}}}$ +\end_inset + + na odprtem +\begin_inset Formula $I\subset\mathbb{R}\Rightarrow\forall a,x\in I\exists c\in\left(\min\left\{ a,x\right\} ,\max\left\{ a,x\right\} \right)\ni:f\left(x\right)-T_{f,a,n}\left(x\right)=R_{f,a,n}\left(x\right)=\frac{f^{\left(n+1\right)}\left(c\right)}{\left(n+1\right)!}$ +\end_inset + + +\begin_inset Formula $\left(x-a\right)^{n+1}.\text{ Posledično velja tudi takale ocena:}$ +\end_inset + + +\begin_inset Formula +\[ +\exists M>0\forall x\in I:\left|f^{\left(n+1\right)}\right|\leq M\Rightarrow R_{f,a,n}\left(x\right)=\frac{M}{\left(n+1\right)!}\left|x-a\right|^{n+1} +\] + +\end_inset + + +\end_layout + +\begin_layout Standard +\begin_inset Formula +\[ +R=\lim_{n\to\infty}\left|\frac{c_{n}}{c_{n+1}}\right|,\quad R=\lim_{n\to\infty}\frac{1}{\sqrt[n]{\left|c_{n}\right|}} +\] + +\end_inset + + +\end_layout + +\begin_layout Standard +\begin_inset ERT +status open + +\begin_layout Plain Layout + + +\backslash +end{multicols} +\end_layout + +\end_inset + + +\end_layout + +\end_body +\end_document diff --git a/šola/la/kolokvij2.lyx b/šola/la/kolokvij2.lyx new file mode 100644 index 0000000..c52bc97 --- /dev/null +++ b/šola/la/kolokvij2.lyx @@ -0,0 +1,1101 @@ +#LyX 2.3 created this file. For more info see http://www.lyx.org/ +\lyxformat 544 +\begin_document +\begin_header +\save_transient_properties true +\origin unavailable +\textclass article +\begin_preamble +\usepackage{siunitx} +\usepackage{pgfplots} +\usepackage{listings} +\usepackage{multicol} +\sisetup{output-decimal-marker = {,}, quotient-mode=fraction, output-exponent-marker=\ensuremath{\mathrm{3}}} +\end_preamble +\use_default_options true +\begin_modules +enumitem +\end_modules +\maintain_unincluded_children false +\language slovene +\language_package default +\inputencoding auto +\fontencoding global +\font_roman "default" "default" +\font_sans "default" "default" +\font_typewriter "default" "default" +\font_math "auto" "auto" +\font_default_family default +\use_non_tex_fonts false +\font_sc false +\font_osf false +\font_sf_scale 100 100 +\font_tt_scale 100 100 +\use_microtype false +\use_dash_ligatures true +\graphics default +\default_output_format default +\output_sync 0 +\bibtex_command default +\index_command default +\paperfontsize default +\spacing single +\use_hyperref false +\papersize default +\use_geometry true +\use_package amsmath 1 +\use_package amssymb 1 +\use_package cancel 1 +\use_package esint 1 +\use_package mathdots 1 +\use_package mathtools 1 +\use_package mhchem 1 +\use_package stackrel 1 +\use_package stmaryrd 1 +\use_package undertilde 1 +\cite_engine basic +\cite_engine_type default +\biblio_style plain +\use_bibtopic false +\use_indices false +\paperorientation portrait +\suppress_date false +\justification false +\use_refstyle 1 +\use_minted 0 +\index Index +\shortcut idx +\color #008000 +\end_index +\leftmargin 1cm +\topmargin 2cm +\rightmargin 1cm +\bottommargin 2cm +\headheight 1cm +\headsep 1cm +\footskip 1cm +\secnumdepth 3 +\tocdepth 3 +\paragraph_separation indent +\paragraph_indentation default +\is_math_indent 0 +\math_numbering_side default +\quotes_style german +\dynamic_quotes 0 +\papercolumns 1 +\papersides 1 +\paperpagestyle default +\tracking_changes false +\output_changes false +\html_math_output 0 +\html_css_as_file 0 +\html_be_strict false +\end_header + +\begin_body + +\begin_layout Standard +\begin_inset ERT +status open + +\begin_layout Plain Layout + + +\backslash +newcommand +\backslash +euler{e} +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard +\begin_inset ERT +status open + +\begin_layout Plain Layout + + +\backslash +begin{multicols}{2} +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard +\begin_inset Formula $\left(AB\right)^{T}=B^{T}+A^{T}$ +\end_inset + + +\end_layout + +\begin_layout Standard +\begin_inset Formula $E_{ij}\left(\alpha\right)\coloneqq\texttt{i+=\ensuremath{\alpha}j}$ +\end_inset + +, +\begin_inset Formula $P_{ij}\coloneqq\texttt{i,j=j,i}$ +\end_inset + +, +\begin_inset Formula $E_{i}\left(\alpha\right)\coloneqq\texttt{i*=\ensuremath{\alpha}}$ +\end_inset + + +\end_layout + +\begin_layout Standard +\begin_inset Formula $E_{ij}\left(\alpha\right)^{-1}=E_{ij}\left(\alpha\right)$ +\end_inset + +, +\begin_inset Formula $P_{ij}^{-1}=P_{ji}$ +\end_inset + +, +\begin_inset Formula $E_{i}\left(\beta\right)^{-1}=E_{i}\left(\beta^{-1}\right)$ +\end_inset + + +\end_layout + +\begin_layout Standard +\begin_inset Formula $\nexists A_{m,n}^{-1}\Leftrightarrow A=0\Leftrightarrow m\not=n\Leftrightarrow\det A=0\Leftrightarrow A$ +\end_inset + + ima +\begin_inset Formula $\vec{0}$ +\end_inset + + vrstico/stolpec +\end_layout + +\begin_layout Paragraph +Karakterizacija obrnljivih matrik +\end_layout + +\begin_layout Standard +\begin_inset ERT +status open + +\begin_layout Plain Layout + + +\backslash +begin{multicols}{2} +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Itemize +\begin_inset Argument 1 +status open + +\begin_layout Plain Layout +label= +\begin_inset Formula $\Leftrightarrow$ +\end_inset + + +\end_layout + +\end_inset + + +\begin_inset Formula $\exists A^{-1}$ +\end_inset + + +\end_layout + +\begin_layout Itemize +\begin_inset Formula $\exists B\ni:BA=I$ +\end_inset + + +\end_layout + +\begin_layout Itemize +\begin_inset Formula $\exists B\ni:AB=I$ +\end_inset + + +\end_layout + +\begin_layout Itemize +\begin_inset Formula $\left(AX=0\Longrightarrow X=0\right)$ +\end_inset + + +\end_layout + +\begin_layout Itemize +stolpci so ogrodje +\end_layout + +\begin_layout Itemize +\begin_inset Formula $\text{RKSO}\left(A\right)=I$ +\end_inset + + +\end_layout + +\begin_layout Itemize +\begin_inset Formula $\forall\vec{b}\exists\vec{x}\ni:A\vec{x}=\vec{b}$ +\end_inset + + +\end_layout + +\begin_layout Itemize +\begin_inset Formula $A=$ +\end_inset + + produkt E. + M. +\end_layout + +\begin_layout Standard +\begin_inset ERT +status open + +\begin_layout Plain Layout + + +\backslash +end{multicols} +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard +\begin_inset Note Note +status open + +\begin_layout Plain Layout +\begin_inset Formula $\exists A^{-1}\Longleftrightarrow\exists B\ni:BA=I\Longleftrightarrow\exists B\ni:AB=I\Longleftrightarrow$ +\end_inset + + stolpci so LN +\begin_inset Formula $\Longleftrightarrow\left(AX=0\Longrightarrow X=0\right)\Longleftrightarrow$ +\end_inset + +stolpci so ogrodje +\begin_inset Formula $\Longleftrightarrow\text{RKSO}\left(A\right)=$ +\end_inset + + +\begin_inset Formula $I\Longleftrightarrow\forall\vec{b}\exists\vec{x}\ni:A\vec{x}=\vec{b}\Longleftrightarrow A=$ +\end_inset + +produkt E.M. +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard +Matrični zapis sistema: +\begin_inset Formula $A\vec{x}=\vec{b}$ +\end_inset + + +\end_layout + +\begin_layout Standard +Najkrajša rešitev sistema +\begin_inset Formula $\vec{x_{0}}\Leftarrow\vert\vert A\vec{x_{0}}-\vec{b}\vert\vert=\min\vert\vert A\vec{x}-\vec{b}\vert\vert$ +\end_inset + + +\end_layout + +\begin_layout Standard +... + je običajna rešitev +\begin_inset Formula $A^{T}A\vec{x}=A^{T}\vec{b}$ +\end_inset + + +\end_layout + +\begin_layout Standard +Desno množenje z E. + M. + je manipulacija stoplcev. +\end_layout + +\begin_layout Standard +\begin_inset Formula $\det\left[\begin{array}{cc} +a & b\\ +c & d +\end{array}\right]=ad-bc$ +\end_inset + + +\end_layout + +\begin_layout Standard +\begin_inset Formula $A_{i,j}\coloneqq A$ +\end_inset + + brez +\begin_inset Formula $i$ +\end_inset + +te vrstice in +\begin_inset Formula $j$ +\end_inset + +tega stolpca +\end_layout + +\begin_layout Standard +\begin_inset Formula $\det[a]=a$ +\end_inset + +, +\begin_inset Formula $\det A=\sum_{k=1}^{n}\left(-1\right)^{k+1}a_{1,k}\det A_{1,j}$ +\end_inset + + +\end_layout + +\begin_layout Standard +Razvoj po +\begin_inset Formula $i$ +\end_inset + +ti vrstici: +\begin_inset Formula $\det A=\sum_{j=1}^{n}\left(-1\right)^{i+j}a_{ij}\det A_{ij}$ +\end_inset + + +\end_layout + +\begin_layout Standard +Razvoj po +\begin_inset Formula $j$ +\end_inset + +tem stolpcu: +\begin_inset Formula $\det A=\sum_{i=1}^{n}\left(-1\right)^{i+j}a_{ij}\det A_{ij}$ +\end_inset + + +\end_layout + +\begin_layout Standard +\begin_inset Formula $\det$ +\end_inset + + trikotne matrike: +\begin_inset Formula $\prod_{i=1}^{n}a_{ii}$ +\end_inset + + +\end_layout + +\begin_layout Standard +Trikotna matrika ima pod ali nad diagonalo same ničle. +\end_layout + +\begin_layout Standard +\begin_inset Formula $\det\left(P_{ij}A\right)=-detA,\quad\det\left(E_{i}\alpha A\right)=\alpha\det A$ +\end_inset + + +\end_layout + +\begin_layout Standard +\begin_inset Formula $\det\left(E_{ij}\alpha A\right)=\det A,\quad\det\left(AB\right)=\det A\det B$ +\end_inset + + +\end_layout + +\begin_layout Standard +\begin_inset Formula $\det\left[\begin{array}{cc} +A & B\\ +0 & C +\end{array}\right]=\det A\det C,\quad\det A^{T}=\det A$ +\end_inset + + +\end_layout + +\begin_layout Standard +\begin_inset Formula +\[ +\det A^{n}=\left(\det A\right)^{n}\text{ velja tudi za inverz} +\] + +\end_inset + + +\end_layout + +\begin_layout Standard +\begin_inset Formula $\det P_{ij}=-1,\quad\det E_{i}\left(\alpha\right)=\alpha,\quad\det E_{ij}\left(\alpha\right)=1$ +\end_inset + + +\end_layout + +\begin_layout Standard +\begin_inset Formula $\det\mathbb{R}^{3}$ +\end_inset + +: negativne diagonale prištejemo, pozitivne odštejemo +\end_layout + +\begin_layout Paragraph +Cramerjevo pravilo +\end_layout + +\begin_layout Standard +za rešitev sistema s kvadratno matriko koeficientov: +\begin_inset Formula $x_{i}=\frac{\det A_{i}\left(\vec{b}\right)}{\det A}$ +\end_inset + +, kjer je +\begin_inset Formula $A_{i}\left(\vec{b}\right)$ +\end_inset + + matrika +\begin_inset Formula $A$ +\end_inset + +, ki ima namesto +\begin_inset Formula $i$ +\end_inset + +-tega stolpca +\begin_inset Formula $\vec{b}$ +\end_inset + +. +\end_layout + +\begin_layout Paragraph +Inverz matrike +\end_layout + +\begin_layout Standard +\begin_inset Formula $A_{ij}^{-1}=\frac{\det A_{ji}\left(-1\right)^{j+i}}{\det A}=\frac{1}{\det A}\tilde{A}^{T}$ +\end_inset + +, kjer je +\begin_inset Formula $\tilde{A}$ +\end_inset + + kofaktorska matrika: +\begin_inset Formula $\tilde{A_{ij}}=\det A_{ji}\left(-1\right)^{i+j}$ +\end_inset + +. +\end_layout + +\begin_layout Paragraph +Algebrske strukture +\end_layout + +\begin_layout Standard +grupoid: +\begin_inset Formula $\left(M\not=\emptyset,\circ:\text{M\ensuremath{\times M\to M}}\right)$ +\end_inset + +, +\series bold +polgrupa +\series default + je asociativen grupoid, +\series bold +monoid +\series default + je polgrupa z enoto, +\series bold +grupa +\series default +je monoid z inverzom za vsak element, +\series bold +abelova grupa +\series default + je komutativna. +\end_layout + +\begin_layout Standard +Desna enota: +\begin_inset Formula $a\circ e=a$ +\end_inset + +. + Če je leva in desna, je enota. + Grupoid ima kvečjemu eno enoto. + Če je več levih, desne ni. +\end_layout + +\begin_layout Standard +Desni inverz: +\begin_inset Formula $a\circ a^{-1}=e$ +\end_inset + +. + Če je levi in desni, je inverz. + Inverz je enoličen. + V monoidu je levi tudi desni. +\end_layout + +\begin_layout Standard +Ko je +\begin_inset Formula $\left(M,\circ\right)$ +\end_inset + + grupoid in +\begin_inset Formula $N\subset M,N\not=\emptyset$ +\end_inset + +, je +\begin_inset Formula $N$ +\end_inset + + +\series bold +podgrupoid +\series default +, če +\begin_inset Formula $\forall a,b\in N:a\circ b\in N$ +\end_inset + +. + +\begin_inset Formula $N$ +\end_inset + + podeduje +\begin_inset Formula $\circ$ +\end_inset + + v +\begin_inset Formula $\circ_{N}:N\times N\to N$ +\end_inset + +. + +\begin_inset Formula $\circ_{N}$ +\end_inset + + ohrani komutativnost in asociativnost. + Enota se ne ohrani vedno, inverzi se ne ohranijo vedno. +\end_layout + +\begin_layout Standard +Ko je +\begin_inset Formula $\left(M,\circ\right)$ +\end_inset + + polgrupa, +\begin_inset Formula $N$ +\end_inset + + podgrupoid, je +\series bold + +\begin_inset Formula $N$ +\end_inset + + podpolgrupa +\series default +. +\end_layout + +\begin_layout Standard +Ko je +\begin_inset Formula $\left(M,\circ\right)$ +\end_inset + + monoid in +\begin_inset Formula $N$ +\end_inset + + podgrupoid, je +\begin_inset Formula $N$ +\end_inset + + +\series bold +podmonoid +\series default +, če vsebuje enoto +\begin_inset Formula $\left(M,\circ\right)$ +\end_inset + + (da, prav tisto). +\end_layout + +\begin_layout Standard +Ko je +\begin_inset Formula $\left(M,\circ\right)$ +\end_inset + + grupa in +\begin_inset Formula $N$ +\end_inset + + podmonoid, je +\begin_inset Formula $N$ +\end_inset + + +\series bold +podgrupa +\series default +, če vsebuje inverze vseh svojih elementov. +\end_layout + +\begin_layout Standard +\begin_inset Formula $N\not=\emptyset$ +\end_inset + + je +\series bold +podgrupa +\series default + +\begin_inset Formula $\left(M,\circ\right)$ +\end_inset + +, ko +\begin_inset Formula $a,b\in N\Rightarrow a\circ b^{-1}\in N$ +\end_inset + +. +\end_layout + +\begin_layout Standard +\begin_inset Formula $GL_{n}$ +\end_inset + + je grupa vseh obrnljivih matrik z množenjem matrik, +\begin_inset Formula $O_{n}$ +\end_inset + + je grupa matrik, kjer +\begin_inset Formula $A^{T}=A^{-1}$ +\end_inset + + (ortogonalne), +\begin_inset Formula $SL_{n}$ +\end_inset + + je grupa matrik z +\begin_inset Formula $\det A=1$ +\end_inset + +, +\begin_inset Formula $SO_{n}$ +\end_inset + + je grupa ortogonalnih matrik z +\begin_inset Formula $\det A=1$ +\end_inset + +. +\end_layout + +\begin_layout Paragraph +Homomorfizem +\end_layout + +\begin_layout Standard +grupoidov in polgrup +\begin_inset Formula $\left(M_{1},\circ_{1}\right),\left(M_{2},\circ_{2}\right)$ +\end_inset + + je +\begin_inset Formula $f:M_{1}\to M_{2}\ni:\forall a,b\in M_{1}:\left(f\left(a\circ_{1}b\right)=f\left(a\right)\circ_{2}f\left(b\right)\right)$ +\end_inset + +. +\end_layout + +\begin_layout Standard +Homomorfizem monoidov mora imeti še lastnost +\begin_inset Formula $f\left(e_{1}\right)=e_{2}$ +\end_inset + +, homomorfizem grup pa lastnost +\begin_inset Formula $f\left(a^{-1}\right)=f\left(a\right)^{-1}$ +\end_inset + +. +\end_layout + +\begin_layout Standard +Kompozitum homomorfizmov je homomorfizem. +\end_layout + +\begin_layout Standard + +\series bold +Izomorfizem +\series default + je bijektiven homomorfizem. + Med izomorfnima grupama obstaja izomorfizem. +\end_layout + +\begin_layout Standard +\begin_inset Formula $\left(M,+,\cdot\right)$ +\end_inset + + je +\series bold +bigrupoid +\series default +, ko sta +\begin_inset Formula $\left(M,+\right)$ +\end_inset + + in +\begin_inset Formula $\left(M,\cdot\right)$ +\end_inset + + grupoida. +\end_layout + +\begin_layout Standard + +\series bold +Distributiven bigrupoid +\series default +ima +\series bold +po eno +\series default + L in D distributivnost in je +\series bold +polkolobar +\series default +, če je +\begin_inset Formula $\left(M,+\right)$ +\end_inset + + komutativna polgrupa. +\end_layout + +\begin_layout Standard + +\series bold +Kolobar +\series default + je distri. + bigrupoid, kjer je +\series bold + +\begin_inset Formula $\left(M,+\right)$ +\end_inset + + +\series default +abelova grupa. +\end_layout + +\begin_layout Standard +Pri +\series bold +asociativnem kolobarju +\series default +je +\begin_inset Formula $\left(M,\cdot\right)$ +\end_inset + + polgrupa. + Lemut pravi, da je to pogoj že za kolobarje, Cimprič pa ne. +\end_layout + +\begin_layout Standard +Pri +\series bold +asociativnem kolobarju z enoto +\series default +je +\begin_inset Formula $\left(M,\cdot\right)$ +\end_inset + + monoid. +\end_layout + +\begin_layout Standard + +\series bold +Obseg +\series default + je kolobar z enoto za množenje +\series bold + +\begin_inset Formula $1$ +\end_inset + + +\series default +in inverzom za množenje za vsak neničeln element ( +\begin_inset Formula $0$ +\end_inset + + je enota za +\begin_inset Formula $+$ +\end_inset + +). +\end_layout + +\begin_layout Standard + +\series bold +Komutativen kolobar +\series default + ima komutativno množenje. +\end_layout + +\begin_layout Standard + +\series bold +Polje +\series default +je komutativen obseg. +\end_layout + +\begin_layout Standard + +\series bold +Podbigrupoid +\series default +je +\begin_inset Formula $N\subset M$ +\end_inset + +, zaprta za +\begin_inset Formula $+$ +\end_inset + + in +\begin_inset Formula $\cdot$ +\end_inset + +. +\end_layout + +\begin_layout Standard + +\series bold +Podkolobar +\series default + je +\begin_inset Formula $N\subset M$ +\end_inset + +, da je +\begin_inset Formula $N$ +\end_inset + + podgrupa +\begin_inset Formula $\left(M,+\right)$ +\end_inset + + in podgrupoid +\begin_inset Formula $\left(M,\cdot\right)$ +\end_inset + + – +\begin_inset Formula $N$ +\end_inset + + zaprta za odštevanje in množenje. +\end_layout + +\begin_layout Standard + +\series bold +Podobseg +\series default + je podkolobar, kjer je +\begin_inset Formula $N\backslash\left\{ 0\right\} $ +\end_inset + + podgrupa +\begin_inset Formula $\left(M\backslash\left\{ 0\right\} ,\cdot\right)$ +\end_inset + +. + +\begin_inset Formula $0$ +\end_inset + + namreč ni obrnljiva – +\begin_inset Formula $N$ +\end_inset + + + zaprta za +\begin_inset Formula $-$ +\end_inset + + in deljenje. +\end_layout + +\begin_layout Standard + +\series bold +Homomorfizem kolobarjev +\series default + je +\begin_inset Formula $f:M_{1}\to M_{2}\ni:f\left(a+_{1}b\right)=f\left(a\right)+_{2}f\left(b\right)\wedge f\left(a\cdot_{1}b\right)=f\left(a\right)\cdot_{2}f\left(b\right)$ +\end_inset + + +\end_layout + +\begin_layout Standard + +\series bold +Homomorfizem kolobarjev z enoto +\series default +dodatno +\begin_inset Formula $f\left(1_{1}\right)=1_{2}$ +\end_inset + + +\end_layout + +\begin_layout Paragraph +Vektorski prostor +\end_layout + +\begin_layout Standard +je Abelova grupa z množenjem s skalarjem. + +\begin_inset Formula $F$ +\end_inset + + je polje, za prostor +\begin_inset Formula $\left(V,+,\cdot\right)$ +\end_inset + + nad +\begin_inset Formula $F$ +\end_inset + + velja: +\end_layout + +\begin_layout Itemize +\begin_inset Formula $\left(V,+\right)$ +\end_inset + + je Abelova grupa +\end_layout + +\begin_layout Itemize +\begin_inset Formula $\alpha\cdot\left(a+b\right)=\alpha\cdot a+\alpha\cdot b,\quad\left(\alpha+\beta\right)\cdot a=\alpha\cdot a+\beta\cdot a$ +\end_inset + + +\end_layout + +\begin_layout Itemize +\begin_inset Formula $\left(\alpha\cdot\beta\right)\cdot a=\alpha\cdot\left(\beta\cdot a\right),\quad1\cdot a=a$ +\end_inset + + +\end_layout + +\begin_layout Standard + +\series bold +Direktna vsota vektorskih prostorov +\series default + je vektorski prostor. + +\begin_inset Formula $V_{1}\oplus V_{2}$ +\end_inset + + so pari +\begin_inset Formula $\left(v_{1},v_{2}\right)$ +\end_inset + +. + +\begin_inset Formula $\left(v_{1},v_{2}\right)+\left(v_{1}',v_{2}'\right)=\left(v_{1}+v_{1}',v_{2}+v_{2}'\right)$ +\end_inset + +, +\begin_inset Formula $\alpha\cdot\left(v_{1},v_{2}\right)=\left(\alpha\cdot v_{1},\alpha\cdot v_{2}\right)$ +\end_inset + +. +\end_layout + +\begin_layout Paragraph +Vektorski podprostor +\end_layout + +\begin_layout Standard +je +\begin_inset Formula $W\subseteq V,W\not=\emptyset$ +\end_inset + +, zaprta za seštevanje in množenje s skalarjem. + Oziroma taka, da vsebuje vse svoje linearne kombinacije — +\begin_inset Formula $\forall a,b\in W\forall\alpha,\beta\in F:\alpha a+\beta b\in W$ +\end_inset + +. + Vsak podprostor vsebuje 0. + +\series bold +Presek podprostorov +\series default + je tudi sam podprostor. + +\series bold +Vsota podprostorov +\series default + ( +\begin_inset Formula $W_{1}+W_{2}=\left\{ w_{1}+w_{2};w_{1}\in W_{1},w_{2}\in W_{2}\right\} $ +\end_inset + +) je tudi sama podprostor. +\end_layout + +\begin_layout Standard +\begin_inset ERT +status open + +\begin_layout Plain Layout + + +\backslash +end{multicols} +\end_layout + +\end_inset + + +\end_layout + +\end_body +\end_document diff --git a/šola/p1/dn/DN11_63230317.java b/šola/p1/dn/DN11_63230317.java new file mode 100644 index 0000000..d78823d --- /dev/null +++ b/šola/p1/dn/DN11_63230317.java @@ -0,0 +1,146 @@ +import java.util.*; +public class DN11_63230317 { + static class Rezultat { + String tekmovalec; + String država; + String disciplina; + int točke; + public Rezultat (String te, String dr, String di, int to) { + tekmovalec = te; + država = dr; + disciplina = di; + točke = to; + } + static class Primerjalnik implements Comparator<Rezultat> { + int pravila[]; + boolean obratno[]; + public Primerjalnik (int[] p, boolean[] o) { + pravila = p; + obratno = o; + } + @Override + public int compare (Rezultat a, Rezultat b) { + for (int i = 0; i < pravila.length; i++) { + if (pravila[i] == 0) { + int r = a.tekmovalec.compareTo(b.tekmovalec); + if (r != 0) + return obratno[i] ? -r : r; + } + if (pravila[i] == 1) { + int r = a.država.compareTo(b.država); + if (r != 0) + return obratno[i] ? -r : r; + } + if (pravila[i] == 2) { + int r = a.disciplina.compareTo(b.disciplina); + if (r != 0) + return obratno[i] ? -r : r; + } + if (pravila[i] == 3) { + int r = Integer.compare(a.točke, b.točke); + if (r != 0) + return obratno[i] ? -r : r; + } + } + return 0; + } + } + } + static class Trojka implements Comparable<Trojka> { // zares Nka + int[] trojka; + public Trojka (int[] a) { + trojka = a; + } + @Override + public int compareTo (Trojka o) { + if (o.trojka.length < trojka.length) + return -1; + if (o.trojka.length > trojka.length) + return 1; + for (int i = 0; i < trojka.length; i++) + if (Integer.compare(trojka[i], o.trojka[i]) != 0) + return Integer.compare(trojka[i], o.trojka[i]); + return 0; + } + } + public static void main (String[] args) { + Scanner sc = new Scanner(System.in); + int n = sc.nextInt(); + int u = sc.nextInt(); + ArrayList<Rezultat> rezultati = new ArrayList<>(); + for (int i = 0; i < n; i++) { + String tekmovalec = sc.next(); + String država = sc.next(); + String disciplina = sc.next(); + int točke = sc.nextInt(); + rezultati.add(new Rezultat(tekmovalec, država, disciplina, točke)); + } + String prejšnja = ""; + String prejšnji = ""; + switch (u) { + case 1: + Collections.sort(rezultati, new Rezultat.Primerjalnik(new int[]{1, 0, 2, 3}, new boolean[]{false, false, false, false})); + for (Rezultat rezultat : rezultati) { + if (!prejšnja.equals(rezultat.država)) { + System.out.println("[" + rezultat.država + "]"); + prejšnja = rezultat.država; + prejšnji = ""; + } + if (!prejšnji.equals(rezultat.tekmovalec)) + System.out.println(" " + rezultat.tekmovalec); + prejšnji = rezultat.tekmovalec; + } + break; + case 2: + Collections.sort(rezultati, new Rezultat.Primerjalnik(new int[]{2, 3, 0, 1}, new boolean[]{false, true, false, false})); + for (Rezultat rezultat : rezultati) { + if (!prejšnja.equals(rezultat.disciplina)) { + System.out.println("[" + rezultat.disciplina + "]"); + prejšnja = rezultat.disciplina; + } + System.out.println(" " + rezultat.tekmovalec + " " + rezultat.država + " " + rezultat.točke); + } + break; + case 3: + Collections.sort(rezultati, new Rezultat.Primerjalnik(new int[]{2, 3, 0, 1}, new boolean[]{false, true, false, false})); + Map<String, Trojka> države = new TreeMap<>(); + int i = 0; + for (Rezultat rezultat : rezultati) { + if (!prejšnja.equals(rezultat.disciplina)) { + prejšnja = rezultat.disciplina; + i = 0; + } + Trojka cur = države.get(rezultat.država); + if (cur == null) { + cur = new Trojka(new int[]{0, 0, 0}); + države.put(rezultat.država, cur); + } + if (i < 3) + cur.trojka[i++]++; + } + ArrayList<Država> urejeneDržave = new ArrayList<>(); + for (String key : države.keySet()) + urejeneDržave.add(new Država(key, države.get(key))); + Collections.sort(urejeneDržave); + for (Država država : urejeneDržave) + System.out.println(država); + break; + } + } + static class Država implements Comparable<Država> { + String ime; + Trojka medalje; + public Država (String i, Trojka m) { + ime = i; + medalje = m; + } + @Override + public int compareTo (Država o) { + return -medalje.compareTo(o.medalje); + } + @Override + public String toString () { + return ime + " " + medalje.trojka[0] + " " + medalje.trojka[1] + " " + medalje.trojka[2]; + } + } +} |