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{K:Kkmo?@0%r>Rc/RnM
1 note · View note
Text
Máy biến áp là thiết bị
Máy biến áp là thiết bị
Đề thi THPT QG – 2020 Điện năng được truyền tải từ máy hạ áp A đến máy hạ áp B bằng đường dây tải điện một pha như sơ đồ hình bên. Cuộn sơ cấp của A được nối với điện áp xoay chiều có giá trị hiệu dụng U không đổi, cuộn thứ cấp của B được nối với tải tiêu thụ X. Gọi tỉ số giữa số vòng dây của cuộn sơ cấp và số vòng dây của cuộn thứ cấp của A là \({k_1}\), tỉ số giữa số vòng dây của cuộn sơ cấp và…
View On WordPress
0 notes
awesome-japan · 5 years
Photo
Tumblr media
今話題沸騰中 魔法のペットボトルクーラーボトルに K-1ファイター皇治 TEAM ONE オリジナル ✨STAY COOL ステイクール を限定販売致します🎉 . ステンレス製 魔法クーラーボトル 真空 2重構造 になっており、マラソン ロードバイクや、ジム、アウトドアに使え500ml用ペットボトル水筒😋 楽天市場Awesome Japanにて発売開始! . #awesome #オーサム #K_1 #team_one #皇治 #kouzi #ステイクール #stay cool #暑さ対策 #魔法 #猛暑 #水筒 #魔法瓶 #ひんやりグッズ #ペットボトル #ペットボトル収納 #ペットボトルホルダー #快適 #ステンレスボトル #クーラーボトル https://www.instagram.com/p/Bxys5eTFUBT/?igshid=1czib7akn012n
0 notes
motswanarap · 7 years
Video
I miss him already #Kaone aka #K_1
0 notes
Text
Hashes
So hashes are great. They can be used to hide passwords and also to verify original documents. They take any length of message and turn it into a fixed length. Ideally, changing a single bit in the original message results in half the bits used in the hashed value. This is to stop people from easily determining what similar initial values are from their hashes.
SHA2 and some others uses the below pattern, taking an initialisation vector and combining it with the first portion of the message with the hashing function. This hashed value is then used as the initialisation vector for the next section of the message. When the message isn’t perfectly divisible by the size of the blocks, extra padding is added on to the last message block. 
Tumblr media
The two initialisation vector are used to stop length extension attacks. It works with the following formula. 
H = h( k_2⋅h( k_1⋅p ) )
When used for password storage, they limit how secure your password can be. Consider that if your password has more of bits than the hash, the hash will make your password shorter bit wise. The only difference is that if your password is predictable at that length, a long password might be easier to break than brute forcing it with a different password that is likely gibberish that also produces the same hash, but it’s unlikely since most non brute forcing programs only consider shorter length passwords at the moment. That may change.
But don’t use MD5 or SHA1, they’ve been broken. You can google a hash and get back original passwords. These hashes are too short to use. A colliding result, where two inputs result in the same hash can be found at roughly the squareroot of the total space, which is half the bits. 128 bits may seem like a lot, but you only need to do 64 bits of work to get a collision to break it. 
Now, hashes can be used to verify legitimate documents. This works since a company will release both the document and the hash. If the document when hashed doesn’t match the hash, it’s not the real one. 
Problems arise if you can find a document that hashes to the same string. So you still need a good long hash.
Sometime in the future, there may come a time where signing something with your RSA is a good as a handwritten signature. But since RSA is slow, it would be easier to do that on something smaller, like a hash of a document. Simply encrypt it with your private key, and if it become the true hash when decrypted with the public key, it can be verified. 
Just be careful what you sign. If you don’t modify the document, then it is possible that the sender found a collision for that document with another document they actually want you to sign. They do this by playing with whitespace. They only need to play with half the number of bits of the hash result in whitespace to make enough changes to create a collision with their own document, playing with both sides. If you change the whitespace on a document before you sign it in a different way than an attacker might, then you can sign it and not worry about any nefarious document they actually wanted you to sign. They likely wouldn’t have a matching hashed document for the new document you created. It would take the full amount of work to match your document.  
2 notes · View notes
spiddek · 2 years
Video
youtube
Liked on YouTube: Absturz der ISS? Diese Folgen hat der Ukraine-Krieg für die Raumfahrt https://www.youtube.com/watch?v=k_1-vP3TFWw
0 notes
meccanica-razionale · 2 years
Note
Gentile professore, non ho ben capito come determinare le condizioni che devono soddisfare i parametri affinché le posizioni di equilibrio siano accettabili nella prova del 28/09/2020 di Istituzioni.
[28 settembre 2020]
Come prima cosa, supponiamo certamente che \[ M, m, k_1, k_2 \geq 0, \qquad a > 0. \]
Poi, scegliendo come coordinate lagrangiane l'ascissa \(s\) del baricentro \(G\) dell'asta e la distanza \(u\) del punto \(P\) dal punto \(G\), l'unica posizione di equilibrio che si trova ha \(s=0\) e \[ u = -\frac{\sqrt{3}mg}{2k_2}. \]
Dato che, affinché il punto sia sull'asta, \(u\) deve essere compreso tra \(-2a\) e \(2a\), si trova che \[ -2a \leq -\frac{\sqrt{3}mg}{2k_2} \leq +2a. \] La seconda disuguaglianza è sempre verificata, mentre la prima si può riscrivere \[ \sqrt{3}mg\leq4k_2 a. \]
0 notes
pius2017 · 3 years
Text
When enalaprilat is protent at 2 4 nM, the activity of ACE in plasma is 10 % of its uninhibited activity What is the value of K_1 for enalaprilat? Express your answer to two significant figures and in units of M
When enalaprilat is protent at 2 4 nM, the activity of ACE in plasma is 10 % of its uninhibited activity What is the value of K_1 for enalaprilat? Express your answer to two significant figures and in units of M
Enalapril is an anti-hypertension “prodrug” (1.6., a drug precursor) that is inactive until the ethyl ester (arrow in figure) is hydrolyzed by esterases present in blood plasma. The active drug is the dicarboxylic acid (“enalaprilat”) that results from this hydrolysis reaction Enalaprilat is a competitive inhibitor of the angiotensin-converting enzyme (ACE), which Cleaves the blood-pressure…
Tumblr media
View On WordPress
0 notes
filenamedotpng · 6 years
Text
Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media
K_1.gif
K_3.gif
K_6.gif
K_7.gif
K_8.gif
Athame1.jpg
Athame4.jpg
BroomH.jpg
2 notes · View notes
farshidasadian · 4 years
Photo
Tumblr media
Don’t waste your time with explanations,people only hear What they want to hear. وقتت رو براى توضیح دادن هدر نکن مردم فقط اون چیزى رو که بخوان میشنون. . . . . . . #ووشو #ووشو_ساندا #ووشوکار #ووشوایران #ووشو_تالو #تالو #فرشیداسدیان #فرشید_اسدیان #farshidasadian #تایچی #رزمی #کونگ_فو #farshidasadian #کجاباد #ووشو #zabit #ساندا #sanda #ufc #mma #k_1 #k1 #muaythai#تبریز #کجووار #کجاباد #کجوار #پالایشگاه_تبریز#کوجووار #kujuvar #پتروشیمی_تبریز #farshidasadian#shareblackstories #contemporaryart #فرشیداسدیان #فرشید_اسدیان (at Russia Kazan) https://www.instagram.com/p/CFXO5ipp2aX/?igshid=18mjzxpdk8fev
0 notes
globalmediacampaign · 4 years
Text
Various Ways to Perform Schema Upgrades with Percona XtraDB Cluster
Schema changes are the big challenges in Galera replication. So, it is recommended to understand the schema changes operation for everyone who uses the Percona XtraDB Cluster (PXB)/Galera clusters. In this blog, I am going to explain the operation and impact of the various schema changes methods used in the PXB/Galera cluster. Schema changes with “wsrep_OSU_method = TOI” Schema changes with “wsrep_OSU_method = RSU” Schema changes with “ONLINE ALGORITHMS” Schema changes with “pt-osc” Schema changes with “gh-ost” For testing: I have configured the 3-node Percona Xtradb Cluster (8.0.19). Executing read/write load using the sysbench. mysql> select @@wsrep_cluster_addressG *************************** 1. row *************************** @@wsrep_cluster_address: gcomm://pxc81,pxc82,pxc83 1 row in set (0.00 sec) mysql> select @@version, @@version_commentG *************************** 1. row ***************************         @@version: 8.0.19-10 @@version_comment: Percona XtraDB Cluster (GPL), Release rel10, Revision 727f180, WSREP version 26.4.3 1 row in set (0.00 sec) What is the Impact of Schema Changes in Clusters? By default (TOI), all the nodes in the cluster will be pause during the ALTER process. Because the ALTER needs to be replicated on all the nodes. If the ALTER is big it will affect the performance and could be the cause of the downtime. Rollback is not possible on schema upgrade.  You can’t kill the ALTER query immediately during the operation. So, your application may need to wait until the ALTER completion.  mysql> pager grep alter PAGER set to 'grep alter' mysql> show processlist; | 19 | root            | localhost | schema_changes | Query   |   18 | altering table           | alter table sbtest1 add index idx_c(c) |         0 |             0 | 7 rows in set (0.00 sec) mysql> kill 19; ERROR 1095 (HY000): You are not owner of thread 19 MDLs are set only on one node. Not across all the nodes in the cluster. So, you need additional control over this.  Schema Changes with “wsrep_OSU_method = TOI” TOI: Total Order Isolation TOI is the default method ( wsrep_OSU_method = TOI ) for schema changes. DDL statements are processed in the same order with regard to other transactions in each node.  The full cluster will be blocked/locked during the DDL operation.  This guarantees data consistency. mysql> select @@wsrep_OSU_methodG *************************** 1. row *************************** @@wsrep_OSU_method: TOI 1 row in set (0.00 sec) Example: I am going to run the below ALTER on “pxc81”. alter table sbtest1 add index idx_c(c) After initiating the ALTER on pxc81, My processlist states the COMMIT and UPDATE ( from sysbench ) statements are paused. Only ALTER is in progress. The COMMIT and UPDATE will be resumed once the ALTER is completed. | 17 | root            | localhost | schema_changes | Execute |      15 | closing tables                           | COMMIT                                 |         0 |             0 | | 17 | root            | localhost | schema_changes | Execute |      15 | updating                                 | UPDATE sbtest1 SET c='91668836759-30934071579-18064439108-53267873872-79461377960-32104006456-143369 |         0 |             1 | | 24 | root            | localhost | schema_changes | Query   |      15 | altering table                           | alter table sbtest1 add index idx_c(c) |         0 |             0 | But, still, the SELECT statement can be run with “wsrep_sync_wait != 1” because “wsrep_sync_wait = 1” needs the casualty checks from other nodes. So, it will fail.   SELECT with “wsrep_sync_wait=1” |  1 | system user     |           | schema_changes | Query   |     0 | altering table         | alter table sbtest1 add index idx_c(c) |         0 |             0 | | 15 | root            | localhost | schema_changes | Query   |    40 | starting               | select * from sbtest1 where id=1       |         0 |             0 | mysql> select * from sbtest1 where id=1; ERROR 1205 (HY000): Lock wait timeout exceeded; try restarting transaction TOI can be the right choice for quick operations. CREATE STATEMENTS RENAME INDEX RENAME TABLE DROP INDEX ALGORITHM=INSTANT Schema Changes with “wsrep_OSU_method = RSU” RSU – Rolling Schema Upgrade In this method, DDL statements will not replicate across the cluster nodes. Need to execute the DDL individually on all nodes. The node which is executing the DDL will desync from the cluster group. The other nodes in the cluster are still operational and receive the application connections. Once the node executes the DDL, it will start to apply the missing writesets. In this method, the important thing is the WRITEs should not be performed on that particular table until the schema upgrade completes on all the nodes. Users should be very clear on this because the failure will break the cluster and the data may be unrecoverable.  Gcache should be good enough to store the writesets. Example: At pxc82, I am going to execute the ALTER. Session 1: (setting up the value to RSU – session-level)  mysql> set wsrep_OSU_method=RSU; Query OK, 0 rows affected (0.09 sec) Session 2: (checking the node status) mysql> show global status where Variable_name like 'wsrep_local_recv_queue' or Variable_name like 'wsrep_local_state_comment'; +---------------------------+--------+ | Variable_name             | Value  | +---------------------------+--------+ | wsrep_local_recv_queue    | 0      | | wsrep_local_state_comment | Synced | +---------------------------+--------+ 2 rows in set (0.00 sec) Session 1: (executing the ALTER ) mysql> alter table sbtest1 add index idx_c(c); Session 2: (checking again the node status ) Here the node went to Donor/Desynced state once the ALTER started. You can see the queue also keeps increasing. mysql> nopager;  show global status where Variable_name like 'wsrep_local_recv_queue' or Variable_name like 'wsrep_local_state_comment'; PAGER set to stdout +---------------------------+----------------+ | Variable_name             | Value          | +---------------------------+----------------+ | wsrep_local_recv_queue    | 2053           | | wsrep_local_state_comment | Donor/Desynced | +---------------------------+----------------+ 2 rows in set (0.21 sec) Session 1: (ALTER completed) mysql> alter table sbtest1 add index idx_c(c); Query OK, 0 rows affected (2 min 6.52 sec) Records: 0  Duplicates: 0  Warnings: 0 Session 2: (Node synced to cluster) mysql> show global status where Variable_name like 'wsrep_local_recv_queue' or Variable_name like 'wsrep_local_state_comment'; +---------------------------+--------+ | Variable_name             | Value  | +---------------------------+--------+ | wsrep_local_recv_queue    | 0      | | wsrep_local_state_comment | Synced | +---------------------------+--------+ 2 rows in set (0.00 sec) This step needs to be executed in pxc81 and pxc83 as well. After completing on all nodes, we are good to allow the WRITEs for that table.  The RSU method is not truly disruption-free, as there are few bugs reported regarding RSU. Users should be very clear and careful about executing the RSU for schema updates: https://jira.percona.com/browse/PXC-2620 https://jira.percona.com/browse/PXC-2293 https://jira.percona.com/browse/PXC-1980 Schema Changes with “ONLINE ALGORITHMS” So far, we have 3 algorithms, INPLACE COPY INSTANT With TOI: “ALGORITHM = INPLACE / COPY” still pauses the cluster during the operation. Galera doesn’t allow transactions when an ALTER TABLE statement is run. So if you are using TOI, any ALTER TABLE will block all transactions on all nodes. | 17 | root            | localhost | schema_changes | Execute |      12 | closing tables                           | COMMIT                                                               |         0 |             0 | | 18 | root            | localhost | schema_changes | Execute |      12 | closing tables                           | COMMIT                                                               |         0 |             0 | | 32 | root            | localhost | schema_changes | Query   |      13 | altering table                           | alter table sbtest1 add index idx_c(c), algorithm=inplace, “ALGORITHM=INSTANT” is supported and faster in TOI. mysql> alter table sbtest1 add column test_Ins int , algorithm=instant; Query OK, 0 rows affected (0.24 sec) Records: 0  Duplicates: 0  Warnings: 0 lock=none With RSU: “ALGORITHM = INPLACE/COPY” is still not beneficial on RSU. It pauses the Galera replication and takes the node to Desync.  mysql> show processlist; | 62 | root            | localhost | schema_changes | Query   |    51 | altering table                       | alter table sbtest1 add index idx_c(c), algorithm=inplace, lock=none |         0 |             0 | 5 rows in set (0.06 sec) mysql> nopager;  show global status where Variable_name like 'wsrep_local_recv_queue' or Variable_name like 'wsrep_local_state_comment'; PAGER set to stdout +---------------------------+----------------+ | Variable_name             | Value          | +---------------------------+----------------+ | wsrep_local_recv_queue    | 7335           | | wsrep_local_state_comment | Donor/Desynced | +---------------------------+----------------+ 2 rows in set (0.03 sec) “ALGORITHM=INSTANT” is supported and faster in RSU. But, still, you can use TOI to avoid the additional work. mysql> alter table sbtest1 add column test_Inss int , algorithm=instant; Query OK, 0 rows affected (0.19 sec) Records: 0  Duplicates: 0  Warnings: 0 mysql> select @@wsrep_OSU_method; +--------------------+ | @@wsrep_OSU_method | +--------------------+ | RSU                | +--------------------+ 1 row in set (0.02 sec) I would suggest using the “ALGORITHM = INSTANT ” with TOI wherever you can. But, make sure you have the MySQL 8.x + version. Unfortunately, “ALGORITHM=INSTANT” currently only supports adding new columns.  Schema Changes with “pt-osc” pt-osc : Percona-online-schema-change Personally, I like this approach very much and use this mostly in production environments. Pt-osc provides non-blocking schema upgrades on all nodes in one shot. This should be used with the TOI method. The action flow will be like this: Create a new table “_tablename_new” with the required modification Creates triggers for update the modified rows (insert / update / delete) Copy the records from the original table to the new table using chunk operation. Once the copy is completed, it will swap the table ( original → _old, _new → original ) and drop the triggers and old table. Direct DDLs ( RENAME TABLE, DROP TABLE ) will be used for this operation ( wsrep_OSU_method=TOI ).  For the below ALTER,  alter table schema_changes.sbtest1 add index idx_test_Ins(test_Ins); Pt-osc flow in SQL syntax: Creating new table... CREATE TABLE `schema_changes`.`_sbtest1_new` (   `id` int NOT NULL AUTO_INCREMENT,   `k` int NOT NULL DEFAULT '0',   `c` char(120) NOT NULL DEFAULT '',   `pad` char(60) NOT NULL DEFAULT '',   `test_Ins` int DEFAULT NULL,   PRIMARY KEY (`id`),   KEY `k_1` (`k`) ) ENGINE=InnoDB AUTO_INCREMENT=20400335 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci Created new table schema_changes._sbtest1_new OK. Altering new table... ALTER TABLE `schema_changes`.`_sbtest1_new` add index idx_test_Ins(test_Ins) Altered `schema_changes`.`_sbtest1_new` OK. Not creating triggers because this is a dry run. Not copying rows because this is a dry run. INSERT LOW_PRIORITY IGNORE INTO `schema_changes`.`_sbtest1_new` (`id`, `k`, `c`, `pad`, `test_ins`) SELECT `id`, `k`, `c`, `pad`, `test_ins` FROM `schema_changes`.`sbtest1` FORCE INDEX(`PRIMARY`) WHERE ((`id` >= ?)) AND ((`id` = ?)) ORDER BY `id` LIMIT ?, 2 /*next chunk boundary*/ Not swapping tables because this is a dry run. Not dropping old table because this is a dry run. Not dropping triggers because this is a dry run. DROP TRIGGER IF EXISTS `schema_changes`.`pt_osc_schema_changes_sbtest1_del` DROP TRIGGER IF EXISTS `schema_changes`.`pt_osc_schema_changes_sbtest1_upd` DROP TRIGGER IF EXISTS `schema_changes`.`pt_osc_schema_changes_sbtest1_ins` 2020-09-30T08:31:17 Dropping new table... DROP TABLE IF EXISTS `schema_changes`.`_sbtest1_new`; 2020-09-30T08:31:17 Dropped new table OK. Pt-osc provides several options to perform the effective operations.  You can control the connections, active threads, load, chunk size etc .. For Galera, we have the option “–max-flow-ctrl”. The option will check the average time cluster spent pausing for FC and make the tool pause if it goes over the percentage indicated in the option. By default, the tool will not check the FC. [root@pxc81 log]# less /bin/pt-online-schema-change  | grep -i pausing          print STDERR "Pausing because PXC Flow Control is activen";          print STDERR "Pausing because " To make the schema changes on FOREIGN KEY tables, I would suggest using the “alter-foreign-keys-method = rebuild_constraints”. This helps to maintain the consistency of the schema and its relations. In this approach, before dropping the old table, it runs ALTER on all the child tables to drop existing FK and re-add new FK constraints that points to the columns from the new table. Again, adding and dropping the FOREIGN KEY will be the direct ALTER using TOI. Schema changes with “gh-ost” Gh-ost is doing a similar approach like “pt-osc”. It also helps to do the non-blocking ALTERs on all cluster nodes in one shot. The main difference is gh-ost is triggerless. Gh-ost uses the binary log to track the changes. So you need the following variables and thresholds to perform the gh-ost operation.  log-bin=sakthi-bin binlog-format=ROW log-slave-updates=ON The flow will be like, Creates gh-ost table with the required modifications Copy the records from the original table to the new table using chunk operation. Apply the live changes by reading the DML events from binary logs. Once the binary log events are applied, it will swap the tables ( original –> _old, gh-ost –> original ) and drop the old table. Example: [root@pxc81 schema_changes]# gh-ost --alter="add index idx_test_Inss(test_Ins)" --database=schema_changes --table=sbtest1 --user=root --password=Jesus@7sakthI --allow-on-master --execute [2020/09/30 09:40:56] [info] binlogsyncer.go:133 create BinlogSyncer with config {99999 mysql 127.0.0.1 3306 root    false false false UTC true 0 0s 0s 0 false} [2020/09/30 09:40:56] [info] binlogsyncer.go:354 begin to sync binlog from position (binlog.000027, 196850993) [2020/09/30 09:40:56] [info] binlogsyncer.go:203 register slave for master server 127.0.0.1:3306 [2020/09/30 09:40:56] [info] binlogsyncer.go:723 rotate to (binlog.000027, 196850993) # Migrating `schema_changes`.`sbtest1`; Ghost table is `schema_changes`.`_sbtest1_gho` # Migrating pxc81:3306; inspecting pxc81:3306; executing on pxc81 # Migration started at Wed Sep 30 09:40:56 +0000 2020 # chunk-size: 1000; max-lag-millis: 1500ms; dml-batch-size: 10; max-load: ; critical-load: ; nice-ratio: 0.000000 # throttle-additional-flag-file: /tmp/gh-ost.throttle  # Serving on unix socket: /tmp/gh-ost.schema_changes.sbtest1.sock Copy: 0/6563240 0.0%; Applied: 0; Backlog: 0/1000; Time: 0s(total), 0s(copy); streamer: binlog.000027:196853401; Lag: 0.02s, State: migrating; ETA: N/A Copy: 0/6563240 0.0%; Applied: 0; Backlog: 0/1000; Time: 1s(total), 1s(copy); streamer: binlog.000027:196858195; Lag: 0.01s, State: migrating; ETA: N/A Copy: 22000/6563240 0.3%; Applied: 0; Backlog: 0/1000; Time: 2s(total), 2s(copy); streamer: binlog.000027:201067135; Lag: 0.01s, State: migrating; ETA: 9m58s ....... Copy: 5682000/6563240 86.6%; Applied: 0; Backlog: 0/1000; Time: 16m10s(total), 16m10s(copy); streamer: binlog.000028:213168607; Lag: 0.01s, State: migrating; ETA: 2m30s Copy: 6563000/6563240 100.0%; Applied: 0; Backlog: 0/1000; Time: 20m20s(total), 20m20s(copy); streamer: binlog.000028:382677405; Lag: 0.01s, State: migrating; ETA: 0s Gh-ost also provides several options to perform effective operations.  You can control the connections, active threads, load, chunk size, etc. But unfortunately, “–max-flow-ctl” option is not available in gh-ost.  Conclusion So, finally, I would say, Always use the direct ALTER with TOI for the metadata changes and INSTANT ALTERs. Use pt-online-schema-change with TOI and use the optimal flow control thresholds for InnoDB tables. Schedule pt-online-schema-change operation in off-peak hours for FOREIGN KEY tables. If you use RSU, never forget that you need to execute the ALTER on all nodes individually and you should block the WRITEs for that particular table. Make sure, your Gcache size is good enough to hold the writesets. If you are concerned with triggers, you can use the gh-ost to make the ALTERs. https://www.percona.com/blog/2020/10/06/various-ways-to-perform-schema-upgrades-with-percona-xtradb-cluster/
0 notes
motswanarap · 7 years
Video
I miss him already #Kaone #K_1
0 notes
rebrobindoesmath · 7 years
Text
Chromatic Polynomials & Why They’re Cool
Super Quick Note: This post features LaTeX code, and will be better read directly on my blog, although it should be relatively readable on your dash! 
Okay, so what are chromatic polynomials?
Given a graph $G$, a chromatic polynomial of $G$, denoted $\chi_G(k)$ is a polynomial that outputs the number of proper $k$-colorings of $G$, when $k$ is the number of colors we are given.
Okay, so really, what are chromatic polynomials?
Let’s break down the definition. First, let’s talk in general about graphs. What is a graph? A graph is a collection of points called vertices connected by edges. An example of a graph (this graph has a special name: the Petersen graph) is below:
Tumblr media
Now, let’s say we want to color the vertices of this graph such that no two adjacent vertices (meaning vertices that are connected by an edge) share the same color. This is called a proper coloring of the graph. Additionally, let’s say that we’re only allowed to use $k$ colors. If we have a proper coloring using $k$ colors, we call it a proper $k$-coloring. 
Let’s revisit the definition of our chromatic polynomial. Given our input $k$ is the number of colors, the chromatic polynomial outputs the number of different proper $k$-colorings. 
How do we find the chromatic polynomial?
Well, there’s a couple different ways to find them. Let’s look at finding the chromatic polynomial for different complete graphs. (A complete graph $K_n$ is a graph of $n$ vertices where every vertex is adjacent to every other vertex.)
Let’s take a look at the picture below, which shows $K_1$, $K_2$, and $K_3$.
Tumblr media
What do all these $k$’s by the vertices mean? Let’s suppose we’re given $k$ colors to color each vertex. Pick a vertex of the complete graph to start at. That vertex has a possible $k$ colors it can be. We’re off to a great start! Now pick a vertex adjacent to the first vertex. Since we already took one color for that vertex, we have $k$-1 remaining colors for the current vertex. We continue this pattern until we’re out of vertices. Then what we’ll do is multiply all the values of the vertices together -- and voila, we have our chromatic polynomial.
For example, consider the $K_3$ above. It’s chromatic polynomial, $\chi_{K_3}(k)$, is equal to $k(k-1)(k-2)$. And in fact, for a general $K_n$, the chromatic polynomial, $\chi_{K_n}(k) = k(k-1)(k-2)\cdots(k-n+1)$. This function will tell us how many proper colorings we can get for $K_n$ given $n$ vertices and $k$ colors! How cool!
The process for finding the chromatic polynomial for other (non-complete) graphs is a bit trickier and hinges on something called the Deletion-Contraction Algorithm, also known as the Fundamental Reduction Theorem. While I won’t get into that in this post, if you’re interested in chromatic polynomials, it’s definitely something to check out.
Okay, but really, why is this cool?
The real “cool factor” of chromatic polynomials comes into play when we talk about why they were even created. Chromatic polynomials were originally created by George David Birkhoff in 1912 in an attempt to prove the Four Color Theorem. If he could show that $\chi_G(4)>0$, where $G$ is planar (that is, it can be drawn with no edge crossings), then the Four Color Theorem would be proven. And while the Four Color Theorem ended up being proven in another way, chromatic polynomials still remain Pretty Damn Cool and are an important aspect of algebraic graph theory. 
(I’m also pretty biased, since my current thesis research is regarding graphs whose chromatic polynomials have integer roots.)
Thanks for reading! 
I hope all is well with you! As always, feel free to send me a message/ask/reply/whatever with any questions, comments, or concerns! Stay positive! <3
References:
Chromatic Polynomial History
49 notes · View notes
shiho-elliptic · 5 years
Text
PlaidCTF 2019 Writeup
I played as binja. I solved two challenges and one was solved after the competition.
R u SAd? (crypto)
In this challenge, we have a public key of RSA $$(e, n = pq)$$, encrypted flag $$c$$, $$i_q = q^{-1}\mod p$$, and $$i_p = p^{-1}\mod q$$.
$$i_p$$(resp. $$i_q$$) is an inverse element of $$q$$(resp. $$p$$) in $$\mathrm{mod}\ q$$(resp. $$\mathrm{mod}\ p$$). i.e.
$$$ \begin{aligned} pi_p &\equiv 1\pmod q\cr qi_q &\equiv 1\pmod p \end{aligned} $$$
There exists $$k_1, k_2\in\mathbb{Z}$$ such that satisfy following equations:
$$$ \begin{aligned} pi_p &= 1 + k_1q\cr qi_q &= 1 + k_2p\cr \end{aligned} $$$
Multiply these equations:
$$$ \begin{aligned} (pi_p)(qi_q) &= (1 + k_1q)(1 + k_2p)\cr &= k_1k_2n + k_1q + k_2p + 1 \end{aligned} $$$
Divide by n (in integer):
$$$ i_pi_q = k_1k_2 + \left\lfloor\frac{k_1}{p}\right\rfloor + \left\lfloor\frac{k_2}{q}\right\rfloor + \left\lfloor\frac{1}{n}\right\rfloor $$$
Since $$0\lt\left\lfloor\frac{1}{n}\right\rfloor\lt 1$$, we negligible it. $$k_1$$ and $$k_2$$ is smaller than $$n$$ trivially, so we know $$\left\lfloor\frac{k_1}{p}\right\rfloor$$ and $$\left\lfloor\frac{k_2}{q}\right\rfloor$$ is very small integers.
From these facts, we know there exists sufficiently small positive integer $$\varepsilon$$, such that $$i_pi_q - \varepsilon = k_1k_2$$. Actually, $$\varepsilon = 1$$ in this challenge (I checked by experiment).
Now, we have $$k_1k_2$$. since $$i_pi_qn = k_1k_2n + k_1q + k_2p + 1$$ and $$k_1q + k_2p = i_pi_qn - k_1k_2n - 1$$. Thus, we get $$k_1q$$ and $$k_2p$$ by solve quadratic equation $$x^2 - (k_1q + k_2p)x + (k_1q)(k_2p) = 0$$ using $$k_1k_2n = (k_1q)(k_2p)$$ and $$k_1q + k_2p$$.
We got $$k_1q$$ and $$k_2p$$. so we can compute $$p$$, $$q$$ by $$p = \gcd(n, k_2p)$$, $$q = n / p$$, and decrypt the ciphertext.
https://gist.github.com/elliptic-shiho/d78f4a3c7e4fe452f05dc2971dc19eab
horst (crypto, solved after the competition)
In this challenge, we have a permutation-based cryptosystem, two randomly generated plaintexts, and two ciphertexts corresponding to that.
At first, we formulate this cryptosystem. we denote the Symmetric Group $$S _ {64}$$ by $$\mathcal{S}$$, and let $$\mathcal{M} := \mathcal{S}\times\mathcal{S}$$.
Next, we denote the key of this cryptosystem by $$k\in\mathcal{S}$$, plaintext $$p_i\in\mathcal{M}$$, and ciphertext $$c_i\in\mathcal{M}$$ where $$i = 1, 2$$.
The round function $$R$$ and inverse that is defined by below:
$$$ \begin{aligned} R: \mathcal{M}\ni (x, y) \mapsto (y, kyk^{-1}x)\in\mathcal{M}\cr R^{-1}: \mathcal{M}\ni (x, y)\mapsto (kxk^{-1}y, x)\in\mathcal{M} \end{aligned} $$$
(Note: This writeup used right-to-left composition but the challenge's Permutation class used left-to-right that. e.g. $$kyk^{-1}x$$ is equivalent to x * k.inv() * y * k.)
We denote $$n$$-th iterated map of $$f$$: $$f\circ f\circ \cdots(n\mathrm{\ times\ repeat})\cdots \circ f$$ by $$f^{n}$$ and define the encrypt function as follows:
$$$ \mathrm{Enc}: \mathcal{M}\ni m \mapsto R^3(m)\in\mathcal{M}, $$$
and the decrypt function as follows:
$$$ \mathrm{Dec}: \mathcal{M}\ni c \mapsto (R^{-1})^3({c})\in\mathcal{M}. $$$
Our target is $$k$$, but we have only $$p_i$$ and $$c_i$$.
For convenience, let $$p_i = (x_i, y_i)$$ and $$c_i = (r_i, s_i)$$. By definition of $$\mathrm{Enc}$$, we got following equations:
$$$ \begin{aligned} r_i &= k^2y_ik^{-1}x_ik^{-1}y_i,\cr s_i &= k^3y_ik^{-1}x_ik^{-1}y_i^2k^{-1}x_i. \end{aligned} $$$
Now, we define $$X_i := r_iy_i^{-1}$$ and $$Y_i := s_ix_i^{-1}$$. Then, $$kX_ik^{-1} = Y_i$$ from definition. so let us solve the challenge by this fact.
To solve that, we need following three propositions:
Proposition 1 (decompose to relatively prime cyclic permutation). Let $$\alpha$$ be a permutation with $$n$$ elements. Then there exists an positive integer $$\ell$$ and relatively prime cyclic permutations $$\sigma_1, \sigma_2, \ldots, \sigma_{\ell}\in S_n$$ such that $$\alpha = \sigma_\ell\cdots\sigma_2\sigma_1$$.
Proposition 2. Let $$\alpha, \beta, \gamma$$ be a permutation with $$n$$ elements. Suppose that
$$\beta$$ can represented by cyclic notation: $$\beta = (i_1\ i_2\ \cdots\ i_k)$$
$$\alpha = \gamma\beta\gamma^{-1}$$
Then $$\alpha = (\gamma(i_1)\ \gamma(i_2)\ \cdots \gamma(i_k))$$ holds.
Proposition 3. Let $$\alpha, \beta, \gamma$$ be a permutation with $$n$$ elements. If $$\alpha = \gamma\beta\gamma^{-1}$$ then $$T(\alpha) = T(\beta)$$ where $$T(\alpha)$$ is cyclic type of $$\alpha$$.
From these propositions, we can solve conjugate equation $$Y_i = kX_ik^{-1}$$ by following procedure:
By Prop. 1, Decompose to relatively prime cyclic permuation: $$X_i = \sigma_\ell\cdots\sigma_1$$ and $$Y_i = \tau_m\cdots\tau_1$$.
By Prop. 3, $$m = \ell$$. Since following formula, there exists 1-to-1 map between $$\sigma_t$$ and $$\tau_t$$: $$$ \begin{aligned} Y_i &= kX_ik^{-1} = k(\sigma_\ell\cdots\sigma_1)k^{-1} = (k\sigma_\ell k^{-1})\cdots(k\sigma_1 k^{-1})\cr &= \tau_\ell\cdots\tau_1 \end{aligned} $$$ For simple, we assume the straight mapping: $$k\sigma_tk^{-1} = \tau_t$$ for $$t = 1, \ldots, \ell$$.
By Prop. 2, the 1-to-1 map between $$\sigma_t$$ and $$\tau_t$$ is $$k$$. i.e. if $$\sigma_t = (j_1\ j_2\ \cdots\ j_s)$$ then $$\tau_t = (k(j_1)\ k(j_2)\ \cdots\ k(j_s))$$. so $$k$$ can reconstruct by collect pairs $$(j_t, k(j_t))$$.
After this procedure, we have the key $$k$$. That's all.
It is a note of the implementation:
In the above procedure, we assume the straight mapping but actual mapping is not straight. so we need to brute-force a mapping of decomposed cycle permutations of $$X$$ that and $$Y$$ that.
Even if we selected correct mapping, we don't have information about how corresponding $$Y_i$$ to $$k(j_t)$$. so we have to brute-force all possibility.
~ ↑ in the competition period ~
~ ↓ after the period ~
I bugged code. that's all...
https://gist.github.com/elliptic-shiho/a089e540f8cbc6100b88342e54a414c5
0 notes
dsoccermaster · 5 years
Photo
Tumblr media
Byline: 
Greg Lea
Standfirst: 
These father-and-son combos have dominated Premier League team sheets over the years.
Media: 
aa_2.jpg
b_0.jpg
c_0.jpg
d_0.jpg
e_1.jpg
f_1.jpg
h_1.jpg
g_1.jpg
j_1.jpg
k_1.jpg
l_1.jpg
m_1.jpg
n_1.jpg
Consumers: 
MSN
Premier League
0 notes
mathematicianadda · 4 years
Text
Prove: Three tangents to a parabola form a triangle with an orthocenter on the directrix and a circumcircle passing through the focus
Prove the following:
The intersection points of any three tangents to a parabola given by the formula $y(y-y_0)=2p(x-x_0)$ are vertices of a triangle whose orthocenter belongs to the directrix of the parabola and the circumcircle of the triangle passes through the focus of the parabola.
My attempt:
Orthocenter problem part- edited (old notes deleted to be less chaotic and I believe there is still some space for improvement of the first part):
In the meantime, I realized it would be better to just use the condition of tangency and plug some of its parameters into the formula for a line in the $xy$ plane.
Let $y=k_ix + l_i,\ i=1,2,3$ be a tangent line to a parabola. Then $$p=2k_il_i\implies l_i=\frac{\frac{p}2}{k_i}$$
Now, our equation becomes: $$\boxed{y=k_ix+\frac{\frac{p}2}{k_i}}$$ We can substitute $\frac{p}2$ by $\alpha$, so $$\boxed{y=k_ix+\frac{\alpha}{k_i}}$$ This way, our computations are getting easier. The equations of the three arbitrary tangents to a parabola are: $$\begin{aligned}y&=k_1x+\frac{\alpha}{k_1}\\y&=k_2x+\frac{\alpha}{k_2}\\y&=k_3x+\frac{\alpha}{k_3}\end{aligned}$$ The intersection point of the $i-$th and $j-$ th tangent line: $$k_ix+\frac{\alpha}{k_i}=k_jx+\frac{\alpha}{k_j}\implies x=\alpha\frac{\frac1{k_j}-\frac1{k_i}}{k_i-k_j}=\frac{\alpha}{k_ik_j}$$ $$y=k_i\cdot\frac{\alpha}{k_ik_j}+\frac{\alpha}{k_i}=\alpha\left(\frac1{k_i}+\frac1{k_j}\right)$$ $$\boxed{S_{ij}=\left(\frac{\alpha}{k_ik_j},\alpha\frac{k_i+k_j}{k_ik_j}\right)}$$
Now, we have to find the line perpendicular to the $k-$th tangent line passing through the point $S_{ij}$. $k_\perp=-\frac1{k_k}$ E.g., one altitude of the formed triangle belongs to the line: $$\begin{aligned}y-y_{S_{1,2}}&=k_\perp(x-x_{S_{1,2}})\iff &y&=-\frac1{k_3}x+\frac{\alpha}{k_1k_2k_3}+\alpha\left(\frac1{k_1}+\frac1{k_2}\right)\\&&y&=-\frac1{k_3}x+\alpha\left(\frac1{k_1}+\frac1{k_2}+\frac1{k_1k_2k_3}\right)\end{aligned}$$
So, the $x$ coordinate of the intersection of the three tangent lines: $$\begin{aligned}y&=-\frac1{k_3}x+\alpha\left(\frac1{k_1}+\frac1{k_2}+\frac1{k_1k_2k_3}\right)\\y&=-\frac1{k_2}x+\alpha\left(\frac1{k_1}+\frac1{k_3}+\frac1{k_1k_2k_3}\right)\\y&=-\frac1{k_1}x+\alpha\left(\frac1{k_2}+\frac1{k_3}+\frac1{k_1k_2k_3}\right)\end{aligned}$$ $$\begin{aligned}-\frac1{k_3}x+\alpha\left(\frac1{k_1}+\frac1{k_2}+\frac1{k_1k_2k_3}\right)&=-\frac1{k_2}x+\alpha\left(\frac1{k_1}+\frac1{k_3}+\frac1{k_1k_2k_3}\right)\\\left(\frac1{k_2}-\frac1{k_3}\right)x&=\left(\frac1{k_3}-\frac1{k_2}\right)\alpha\\x&=-\alpha=-\frac{p}2\end{aligned}$$
End of the first part. The rest remains the same not to be off-topic.
Since the points $P_1,P_2, P_3$ are close to the directrix, $\triangle ABC$ in my picture is obtuse and its orthocenter is outside the triangle, but it doesn't have to be so at all.
Let $A,B,C$ be the intersection points of the tangents. $P_2\in\overline{AC}$ due to $P_1\preceq P_2\preceq P_3$.
Let $A'\in\overline{BC}$ s.t. $AA'\perp BC$, $B'\in\overline{AC}$ s.t. $BB'\perp AC$ and $C'\in\overline{AB}$ s.t. $CC'\perp AB$.
The center $S$ of the circumscribed circle $q$ of $\triangle ABC$ is the intersection point of the bisectors $s_1,s_2,s_3$ of the sides $\overline{AB},\overline{BC}$ and $\overline{AC}$ respectively. Furthermore, $\underline{\text{each side bisector is parallel to one of the sides of the triangle}}$, i.e., $$s_1\parallel\overline{AA'}\ \&\ s_2\parallel\overline{BB'}\ \&\ s_3\parallel\overline{CC'} $$
If the orthocenter $T$ is an orthogonal projection of the point $P_2$ onto the directrix $x=-\frac{p}2$ of the parabola, and if the circumscribed circle $q$ really passes through the focus $$\boxed{F\left(\frac{p}2,0\right)\ \text{or}\ F\left(\frac{p}2+x_0,y_0\right)}$$ then $|TP_2|=|P_2F|$.
Picture:
Tumblr media
zoomed:
Tumblr media
According to the notation in the picture: $$\begin{aligned}\measuredangle AA'B&=\measuredangle A'CT=\measuredangle BFL\\\measuredangle B'TA&=\measuredangle ACA'=\measuredangle AFB\end{aligned}$$ I can see: $$\triangle AB'T\sim\triangle BB'C\sim\triangle A'AC\sim AFB'$$ In particular: $\boxed{\triangle AB'T\cong\triangle AFB'\implies\ |TB'|=|B'F|\implies\triangle TFP_2\ \text{is isosceles}\ \implies |TP_2|=|P_2F|\ }$
Also: we can prove the orthogonal projections of the focus onto the three tangents belong to the tangent passing through the vertex of the parabola, meaning those projections are collinear, which, by the Simson theorem, implies the focus belongs to the circumcircle of the triangle.
May I ask for advice on solving this task and improve the parts I might have done correctly to be concise as possible? Thank you in advance!
P. S. I found a related paper, but almost none of the information has been covered in our official literature.
Just in case, I found an answer by @JeanMarie recalling the fact the orthocenter of the observed triangle lies on the directrix of the parabola, but I couldn't think of proof.
Update on a special case:
I've also read the directrix is the set of all the points in the plane we can draw two mutually perpendicular tangents from (which can be proven via Vieta's formulae and the condition of tangency). In a right-triangle, the orthocenter is obviously in the vertex opposite to the hypothenuse.
from Hot Weekly Questions - Mathematics Stack Exchange from Blogger https://ift.tt/3eHtzRM
0 notes